i am using the Microsoft Ajax Toolkit CalendarExtender
control, to add calendar drop-down functionality to a regular TextBox:
<asp:TextBox ID="edStartDate" runat="server" />
<asp:CalendarExtender ID="CalendarExtender1" runat="server"
TargetControlID="edStartDate" />
Which works fine for most client locales. It seems that the control does a server-request in order to convert a DateTime
into a localized String
.
For example, today (October 1st, 2012) displays fine in Arabic 15/11/33
:
And also displays fine in Lower Sorbian 1. 10. 2012
:
But some locales do not display properly in .NET 1////10////2012
:
In this case i need some sort of OnFormatDate
event, that i can supply the correct localization of a date to a string. Which leads to my question:
How to override AjaxToolkit CalendarExtender date to string conversion?
Note: Don't confuse the question with the example.
- i'm asking how to customize the conversion of a date to a string in a
CalendarExtender
- even if i'm not dealing with a bug in .NET, it doesn't change my question
- even if i'm not dealing with a
CalendarExtender
, i'm still asking the question