SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mask textbox for accepting date

    i have a asp.net text box in the page

    i want to mask the textbox for accepting date in dd/MM/yyyy format using javascript
    using the maskedit control in jax i am ble to do it at design time
    but not in javascript

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2012
    Posts
    117
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello svibuk, try doing this:
    Code:
    Dim myDate As Date = Now
    
    TextBox1.Text = Format(myDate, "MM/dd/yyyy")
    Vincentas

  3. #3
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,877
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    I am not 100% clear if you saying that you cannot do it with javascript due to user restrictions or if you are just not able to? But if you can use JS. I would suggest using a jquery input mask. Check out:

    http://igorescobar.github.io/jQuery-Mask-Plugin/


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •