PDA

View Full Version : datepickerfield that only allows the current year and beyond.



micmac_creations
14 Dec 2011, 6:51 AM
Is there any way to have a datepickerfield to only be able to set the current year (ie 2011) or onward, instead of allowing the user to select all the way back to 1980?

Thanks,
Michael McClenaghan

mitchellsimoens
14 Dec 2011, 7:28 AM
You will need to create your own Ext.Picker and specify it as the picker config on the field.

diego.link.eggy
16 Aug 2012, 9:54 PM
{
xtype: 'datepickerfield',
picker: {


yearFrom : new Date().getFullYear() ,
yearTo : new Date().getFullYear() + 10,


},

},