Hi Shown,
If I am not mistaken, the ScheduleBox uses the current culture's Date.ToShortDateString() to format the headers, so the following code might give you ideas for an inherited ScheduleBox class (which you must also register in web.config):
public class MyScheduleBox : Gizmox.WebGUI.Forms.ScheduleBox
{
private System.Globalization.CultureInfo mobjCustomCulture = null;
private System.Globalization.CultureInfo mobjSavedCulture = null;
private void SetCustomCulture()
{
if (mobjCustomCulture == null)
{
mobjCustomCulture = System.Globalization.CultureInfo.CreateSpecificCulture(System.Threading.Thread.CurrentThread.CurrentCulture.Name);
string[] myDateTimePatterns = new string[] { "ddd MM/dd/yy", "ddd MM/dd/yyyy" };
mobjCustomCulture.DateTimeFormat.SetAllDateTimePatterns(myDateTimePatterns, 'd');
}
mobjSavedCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = mobjCustomCulture;
}
private void RestoreCulture()
{
System.Threading.Thread.CurrentThread.CurrentCulture = mobjSavedCulture;
}
protected override void RenderDayAttributes(Gizmox.WebGUI.Common.Interfaces.IResponseWriter objWriter, DateTime objDay)
{
SetCustomCulture();
base.RenderDayAttributes(objWriter, objDay);
RestoreCulture();
}
}
Hope this helps,
Palli