17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 4312 Views |
-
Changing the date field to US format

29 November 2007 at 10:47am
I'm having the hardest time changing the format of the date that is returned when you select it from the calendar in the form date field. I've changed everything I could see in Date.php & DateField.php. My global date format hasn't changed either. I have flushed the DB & admin & site multiple times.
Is it possible to change the format for this? It seems like a relatively simple thing to do.
-
Re: Changing the date field to US format

29 November 2007 at 1:20pm
looks like you're on the right track with subclassing stuff (at least until we've got proper field-localization going). DateField.php and Date.php should be the only relevant classes here - can you step through the saving/loading process and see at which point the date-format changes?
-
Re: Changing the date field to US format

30 November 2007 at 4:01am
I guess I can change one thing at a time and see if anything happens. I thought I had already changed everything that made sense and it didn't seem to affect anything. But I'll try it again with a different approach.
-
Re: Changing the date field to US format

30 November 2007 at 7:49am
I'm still getting nowhere. I can see where i can change the format for the Nice function. I just can't figure out how to get the Nice function working when it returns the date chosen from the calendar into the text box. I can't seem to figure out where all this happens. I'm assuming I'd find a return $Date somewhere that I could Nice Method to and that would be it.
Is that the right way to do this & if so what file is this in?
-
Re: Changing the date field to US format

30 November 2007 at 9:00am
ah, so we're talking about a CalendarDateField? thats a bit more tricky, you probably need to look at the javascript-logic as well
-
Re: Changing the date field to US format

3 December 2007 at 4:02pm
OK. I'd like to know if anyone has been successful at changing the date format in the stable release of 2.2.0. I was messing with it on 2.2.0-rc2 and it changes just fine. It has been a couple of days since I made the changes and noticed that it was working.
So either there is a bug with the stable version that wasn't in rc2 or it takes several hours to a couple of days to take effect.
Has anyone successfully changed the date format to US?
-
Re: Changing the date field to US format

27 February 2008 at 4:23am Last edited: 27 February 2008 5:22am
I've successfully changed the CalendarDateField to the American Date Format.
I changed this file: jsparty\calendar\calendar-setup.js
In line 5, change "ifFormat : %d/%m/%Y" to "ifFormat : %m/%d/%Y"
It doesn't appear to work at first, but flush the cache and it will show up after you select a date from the pop-up calendar.
Hope this helps!
| 4312 Views | ||
| Go to Top | Next > |



