开发者

create textbox for date field on asp.net

开发者 https://www.devze.com 2023-01-04 02:41 出处:网络
i\'m trying t开发者_运维技巧o creat a form which contain textboxs, and i want to use one to fill in date by clicking in that zone

i'm trying t开发者_运维技巧o creat a form which contain textboxs, and i want to use one to fill in date by clicking in that zone i use asp.net/vb

thks for all yr support


You could use the MaskedEdit control from the AJAX control toolkit.

Sample code:

<asp:TextBox ID="date1" name="date1" runat="server"></asp:TextBox>

<ajaxToolkit:MaskedEditExtender
    TargetControlID="date1" 
    Mask="99/99/9999"
    MessageValidatorTip="true" 
    OnFocusCssClass="MaskedEditFocus" 
    OnInvalidCssClass="MaskedEditError"
    MaskType="Date" 
    InputDirection="RightToLeft" 
    AcceptNegative="Left" 
    DisplayMoney="Left"
    ErrorTooltipEnabled="True"/>

Take a look at this demo: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/MaskedEdit/MaskedEdit.aspx

0

精彩评论

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