-
6 Oct 2010 8:09 AM #1
[CLOSED] DateField with date format 'Y-n-d A g:i' does not honor change from AM to PM
[CLOSED] DateField with date format 'Y-n-d A g:i' does not honor change from AM to PM
Dear reader
I have a DateField that uses following format 'Y-n-d A g:i':
Ext.onReady( function() {
var testDate = new Ext.form.DateField( {
id: 'startDate',
renderTo: 'startDate_container'
allowBlank: false,
format: 'Y-n-d A g:i',
value: new Date(1286378100000) }); }); The html has <div id="startDate_container"></div> where the field is placed
The value in the field is shown as '2010-10-06 AM 11:15'.
1) If 'AM' is changed to 'PM' it goes back to 'AM' on blur
2) If 'AM 11' is changed to 'AM 23' it goes to 'PM 11' after blur
This is inconsistent and leads to the loss of the input
The function beforeBlur seems to be the one there this happens.
For 1) while raw value is '2010-10-06 PM 11:15', the date equivalent returned from parseDate is 'Wed Oct 06 2010 11:15:00 GMT-0400 (Eastern Daylight Time)'
For 2) while raw value '2010-10-06 PM 23:15' is not flagged as invalid input as it should, the date equivalent returned from parseDate is 'Wed Oct 06 2010 23:15:00 GMT-0400 (Eastern Daylight Time)'. After the value is set it is shown as '2010-10-06 PM 11:15'.
Thanks a lot and please please solve this bug
Irena
-
14 Oct 2010 4:13 PM #2
Hi Irena,
I'm not able to reproduce #1 above with the latest SVN (7245) release.
Number 2 is the desired behavior in Ext JS.
Thanks,
Mario
-
14 Oct 2010 4:17 PM #3
FYI It was logged as a support ticket and was since fixed in SVN. Very obscure one
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[2.??][CLOSED] Date bug d/m/Y Swaps day + month when entering date in format d/m/yyy
By gp28tech in forum Ext 2.x: BugsReplies: 2Last Post: 23 Mar 2009, 12:44 AM -
How to change date format after a date field has been created?
By lensesby in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 3 Mar 2009, 7:11 AM -
DateField: Date format
By isys-ch in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 11 Mar 2008, 9:26 AM


Reply With Quote