• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying Slash on Date Input Field

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to have a field where slashes appear prior to entering a date. When the user enters a date, adding slashes would not be required since they are already there. For example, the field can come prepopulated with mm/dd/yyyy and when a used enters their values, the letters will change but the slashes will remain
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing to do with JSP so I'm moving this along to the HTML/Javascript forum.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there really is no easy way to implement this.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You've probably seen this on desktop apps where the framework gives the developer a great deal of fine-tuned control over input elements. Not much in the way of that level of control exists in HTML.
 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pal,

Well...This problem , In my opinion needs lots of handling in the script.

I do agree with Eric.

Well...if you need it, you need to go about this way.

1. Have a text field in ur form, and onLoad of the form, we need to
Set the value of that field to to some string like "dd/mon/yyyy" or
whatever suitable for you.

2. The when he submits or something, we need to pass that value to the script and if at all
needed, we need to handle the date to convert it to our particular format.

3. One more point here is that, lots of customizable date pickers are
available..you can choose one and make it as a plug in for your form
Can even alter the soruce to set the "/" or "-" to separate the date
parts.

This would be better and easy than handling a user entered date.

Cheers,
Swamy.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic