Textbox Dynamic Mask For Date. [Resolved]

Posted by Dotnetrajanikanth under ASP.NET on 12/14/2012 | Points: 10 | Views : 10359 | Status : [Member] | Replies : 5
Hi,

I need a mask for textbox which i am using to input date. the mask should display like "YYYY/MM" then on edit of the mask, the mask should be dynamic.

____________
www.flickr.com/photos/psdesigner/



Responses

Posted by: Somu475 on: 12/14/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi,

Otherwise you can use JQuery mask plugin, download plugin from below site and add it in your solution.

http://digitalbush.com/projects/masked-input-plugin/

Then add the following line in your JavaScript.
$("#TxtDate").mask("9999/99", { placeholder: 'YYYY/MM' });

Hope this meets your requirement.

-Somu

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Somu475 on: 12/14/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

You can use Ajax Masked Edit,

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx

-Somu

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 12/14/2012 [Member] Starter | Points: 25

Up
0
Down
Thank you,

But this I already know. I want mask not like ____/__ i want like "YYYY/MM".

____________
www.flickr.com/photos/psdesigner/

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/14/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
@Dotnetrajanikanth
you can use Ajax TextBoxWatermark Extender with RegularExpression validator

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 12/14/2012 [Member] Starter | Points: 25

Up
0
Down
Ranjeet_8,

That was not i was looking for.

in the initial stage the mask should be like YYYY/MM

While entering the text the mask should persist partially.

Eg: 20YY/MM

2012/MM

2012/1M

atlast 2012/12.

Like this.

Hope you understood..

____________
www.flickr.com/photos/psdesigner/

Dotnetrajanikanth, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response