PDA

View Full Version : How to disable date in DatePicker past date



rachata
16 Mar 2011, 5:52 PM
Could you please help me? I would like to know How to disable date in past on DatePicker?

mitchellsimoens
17 Mar 2011, 4:53 AM
So you only want to be able to pick future dates?


{
xtype: "datefield",
...
minValue: new Date()
}

http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.DateField

rachata
17 Mar 2011, 6:17 PM
Thank you Mitchell Simoens

ikim
21 Mar 2012, 9:16 AM
Is there no similar option for the Touch 2 DatePicker?
http://docs.sencha.com/touch/2-0/#!/api/Ext.field.DatePicker

JavascriptParrot
11 Apr 2012, 4:59 AM
Same question here...

Bleak
13 Jun 2012, 10:03 AM
minValue: new Date() works ok for initial entry, but if it is part of a previously entered record and you load that form, the field becomes invalid since that date has passed.

If I wanted to disable the dates from the Date Picker, but not impact the form validation, would I have to use the disabledDates config?

anuragchaturvedi
3 Aug 2016, 10:57 PM
I want to disable all years in xtype:'datefield' or show only day,month in datepicker extjs