Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    1
    Vote Rating
    0
    irenash is on a distinguished road

      0  

    Post [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

  2. #2
    Sencha User
    Join Date
    Jun 2009
    Posts
    750
    Vote Rating
    0
    meroy is on a distinguished road

      0  

    Default


    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

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,987
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    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!

Similar Threads

  1. Replies: 2
    Last Post: 23 Mar 2009, 12:44 AM
  2. How to change date format after a date field has been created?
    By lensesby in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 Mar 2009, 7:11 AM
  3. DateField: Date format
    By isys-ch in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 11 Mar 2008, 9:26 AM

Thread Participants: 2

Tags for this Thread