Hi I have a text box that i populate on page load with todays short date , ever since adding the maskededitextender the date comes in as
12192012 instead of 12/19/2012 as well when you click on the box the calendarextender fires and lets me select 12/19/2012 but once focus is lost it changes to 12192012 how do i fix this?
merrittr
Member
2 Points
29 Posts
CalendarExtender + MaskedEditExtender loosing / after loosing focus
Dec 19, 2012 04:09 PM|LINK
Hi I have a text box that i populate on page load with todays short date , ever since adding the maskededitextender the date comes in as
12192012 instead of 12/19/2012 as well when you click on the box the calendarextender fires and lets me select 12/19/2012 but once focus is lost it changes to 12192012 how do i fix this?
here is the markup
<asp:TextBox ID="EventDateTB" runat="server"
ontextchanged="EventDateTB_TextChanged"></asp:TextBox>
<asp:MaskedEditExtender ID="EventDateTB_MaskedEditExtender" runat="server"
CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
Mask="99/99/9999" TargetControlID="EventDateTB">
</asp:MaskedEditExtender>
<asp:CalendarExtender ID="EventDateTB_CalendarExtender" runat="server"
Enabled="True" Format="MM/dd/yyyy" TargetControlID="EventDateTB">
</asp:CalendarExtender>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: CalendarExtender + MaskedEditExtender loosing / after loosing focus
Dec 24, 2012 08:02 AM|LINK
Hi,
Don't use maskededitextender to do that. Just using Format porperty to do that.
More details, please refer to: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Calendar/Calendar.aspx .
Feedback to us
Develop and promote your apps in Windows Store
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: CalendarExtender + MaskedEditExtender loosing / after loosing focus
Dec 25, 2012 04:10 AM|LINK
Refer this
http://www.devcurry.com/2009/03/accept-ddmmyyyy-date-format-in-aspnet.html
http://forums.asp.net/t/1439495.aspx
http://forums.asp.net/t/1108130.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
merrittr
Member
2 Points
29 Posts
Re: CalendarExtender + MaskedEditExtender loosing / after loosing focus
Jan 08, 2013 12:38 PM|LINK
it was in the extender properties by default remove after loose focus , that was stripping the mask