开发者

AjaxControlTookit Masked Edit

开发者 https://www.devze.com 2023-01-16 09:31 出处:网络
I\'m trying to create an textbox with a date input mask, such as \"dd/mm/yyyy\". The mask should be displayed before the textbox gains focus and when the user enters the date, the mask should still be

I'm trying to create an textbox with a date input mask, such as "dd/mm/yyyy". The mask should be displayed before the textbox gains focus and when the user enters the date, the mask should still be displayed but be automatic overwritten with the entered numbers.

I tried looking at the Ajax control toolkit, which works fine except t开发者_开发技巧hat I can't set the prompt string only a single character. Is there a workaround or some other controls I can use?


Use TextBoxWatermarkExtender for that

  <cc1:MaskedEditExtender ID="mee" runat="server" AcceptNegative="Left"
  DisplayMoney="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" MaskType="Date"
  TargetControlID="txt">    </cc1:MaskedEditExtender>
  <cc1:TextBoxWatermarkExtender ID="wme" TargetControlID="mee" WatermarkText="MM/dd/yyyy" runat="server" /> 
0

精彩评论

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