A datetime field placeholder question
A datetime field placeholder question
divad.thgirbla
Posts: 36Questions: 14Answers: 1
With manual entry of a datetime field on the Editor form, is there an option or attribute that allows the field to automatically populate the date separators ("/" or "-") while the date is being entered so the user doesn't have to? I thought adding a placeholder attribute would do this but it's not working for me. Thanks.
{label:"Effective Date", name:"Effective_Dte", id:"Effective_Dte", attr:{ "data-displayWidth":"100px", "data-dbCol":"col1", class:'dbDateField', maxlength:10, placeholder:' / / '}
, type: 'datetime', format: 'MM/DD/YYYY' , opts:{yearRange:100} }
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use the mask plugin to do that - see example here.
Colin
Thanks but that wasn't quite what I was looking for. The date field should still be defined as a datetime field so that the calendar pops up when the field gets the focus. Then the user, for whatever reason, decides to not use the calendar, backspaces through the displayed date text and then enters a new date. Is there a way for the mask plugin to be used for the text portion of a date that is entered manually that way?
There isn't at the moment I'm afraid. That's an integration that we haven't worked on (I'm not sure I've thought of that idea before to be honest!). I take the point though, I can see that what you are looking for could be useful, but we don't have that functionality available at the moment - sorry.
Allan
OK, thanks. We're using DataTables/Editor to replace the java applet based screens of an existing system and those screens have that capability. If this could be placed on your to-do list, I'd appreciate it.