Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. javascript to input masked date __/__/____

javascript to input masked date __/__/____

Scheduled Pinned Locked Moved Web Development
javascriptjsonhelptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DineshSharmain
    wrote on last edited by
    #1

    how can i make an input mask on textbox for a date mm/dd/yyyy. example input 16/07/1975. initially it should be displayed like __/__/____ and if i enter a digit then underscore should be replaced by that digit rest should remain same. any help would appreciate.. thanks..

    Dinesh Sharma

    C 1 Reply Last reply
    0
    • D DineshSharmain

      how can i make an input mask on textbox for a date mm/dd/yyyy. example input 16/07/1975. initially it should be displayed like __/__/____ and if i enter a digit then underscore should be replaced by that digit rest should remain same. any help would appreciate.. thanks..

      Dinesh Sharma

      C Offline
      C Offline
      coolestCoder
      wrote on last edited by
      #2

      I dont know much about javascript, but you can use the MaskedEdit extender from AJAX toolkit. Its much easier. I know you will have to use the OnKeyPress type of event to do this. Also the OnBlur event. But I am not sure how to do this in javascript. If possible try using the AJAX control I suggested. Hope I helped you in some manner ?


      "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


      coolestCoder

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups