This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Easy way to set the calendar default date?
Started 16 years ago by igravious | 2 posts |
-
Hi there,
Imagine I need to preset the calendar to $yyyy $mm $dd
How do I do this? Also is there an easy way to preset the date input fields?
Thanks,
AnthonyPosted 16 years ago # -
Hi Anthony,
I'm afraid you should edit some files to do that, you can refer to our previous post in here :
http://www.appnitro.com/forums/topic/date-format-1?replies=5
it will change the date format to "yyyy/mm/dd" for date element.
In case of calendar format, do you want to show "2008-12-01" date format instead of "December, 01" ? If it's so, you can edit "js/calendar.js" and follow these steps :
1. Search around line 1901, you'll find this code :
Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %Y";
replace with this one
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
2. Search around line 118, you will see
this.title.innerHTML = Calendar._MN[month] + ", " + year;
replace with this
this.title.innerHTML = year + "-" + (month+1) + "-" + mday;
those code will modify the calendar display format.
MachForm Support
Posted 16 years ago #
Reply
You must log in to post.