Results 1 to 2 of 2

Thread: minValue in datefield not counting hours

  1. #1

    Default minValue in datefield not counting hours

    Hi everybody,

    I have a datefield editor attached to a datecolumn item.
    What's happening is that I am doing this in beforeedit event:

    Ext.ComponentQuery.query('datecolumn[itemId=startTime]')[0].getEditor().setMinValue( === 0 ? new Date() : e.record.get('startTime'));
                    Ext.ComponentQuery.query('datecolumn[itemId=stopTime]')[0].getEditor().setMinValue( === 0 ? new Date() : e.record.get('stopTime'));
    to associate stopTime/startTime a given date as minValue. (e.record.get('start/stopTime') will return an ISO 8601 string representing date).

    However, let's say my date is 2016-11-12T15:00:00.000Z
    when I put it as minValue, and I replace 15 with 14, it doesn't give any error while instead it should give an error.
    However, if I replace 12 with 11 (so I go back one day) it says that the date must be after 2016-11-12 00:00:00.

    I am using this as a config for the editor:
    editor: {
                    xtype: 'datefield',
                    format: 'Y-m-d H:i:s',
                    dateFormat: 'c',
                    allowBlank: false
    Thank you

  2. #2
    Sencha User
    Join Date
    Feb 2013


    I'm not sure minValue of a datefield considers anything more granular than days when evaluating minimum values.

Similar Threads

  1. Replies: 5
    Last Post: 2 Nov 2012, 11:22 AM
  2. datefield minvalue bug ?
    By nathanblogs in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 8 Dec 2009, 3:21 AM
  3. Setting datefield minvalue
    By Rose23 in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 9 Jul 2008, 9:36 PM
  4. Set minValue/DateField dynamiclly
    By max52 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 6 Apr 2008, 7:57 AM
  5. DateField minValue depending on other DateField
    By dotnetCarpenter in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 17 Dec 2007, 1:37 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts