开发者

AjaxToolkit.MaskedEditExtender doesn't accept mask

开发者 https://www.devze.com 2023-03-28 03:58 出处:网络
overnight the ASP.NET AJAX extender MaskedEdit stopped working. <asp:MaskedEditExtender ID=\"dateTB_Maskedextender\" runat=\"server\"

overnight the ASP.NET AJAX extender MaskedEdit stopped working.

<asp:MaskedEditExtender ID="dateTB_Maskedextender" runat="server" 
    MaskType="Date" Mask="9999/99/99" TargetControlID="dateTB" />

That's my Markup code, pretty straight forward, but when you input a date in the textbox (eg. 2011.08.16) and ch开发者_运维知识库ange controlfocus the last two digits (day) magically turn to zeroes (eg. 2011.08.00). Seeing as the mask="99/99/9999" somehow works I'm not doomed, but I'd very much prefer to keep it yyyy.MM.dd as it's the more logically sound dateformat..

Any information/theories on why it might've stopped working and how to fix it would be apritiated

EDIT2*

Added textbox markup

<asp:TextBox ID="dateTB" runat="server" />


For MaskeditExtender Mask is dependent on cultureName and by default it is en-US and for that default mask supported is 99/99/9999.

so add CultureName="sv-SE" then it will support to Mask="9999/99/99"

Thanks, Arun

0

精彩评论

暂无评论...
验证码 换一张
取 消