<input id="date"
value="2008-12-01"
dojoType="dijit.form.DateTextBox"
constraints="{datePattern:'dd-MM-yyyy'}"
invalidMessage="Invalid date dd-mm-yyyy"
promptMessage="dd-mm-yyyy"
/>
Wednesday, July 23, 2008
Customizing dojo DateTextBox
Sometimes things aint that easy when you really want to get something done in your way. I too felt like that when I wanted dijit.form.DateTextBox to display date in format dd-mm-yyyy. Many talked about using right locale. But I was not concerned about any locales but the format I wanted to get. So here is how you do it in dojo.
Labels:
dojo DateTextBox
Subscribe to:
Post Comments (Atom)
4 comments:
Thank you for post very much.
Thank you, this exactly is the information I needed
Actually allyou needed to do was add dojo.require('dojo.date.locale'); within your header text and locales automatically follow the browser settings!
Thanks a lot.... Saved a lot of time..... :)
Post a Comment