View Full Version : [CLOSED] Ext.form.MonthField Error picking Feb month

29 Jun 2010, 7:12 AM

I have an Ext.form.MonthField and is having an error when I select Feb month and the date is today (06/29) it automatically changes to March

Here is the code:

new Ext.form.MonthField({
fieldLabel: 'Periodo (Mes/Aņo)',
value: new Date().format('m/Y'),
format: 'm/Y',
id: 'periodo',
disabled: false,
minValue: new Date(2009,9,1),
//maxValue: new Date(2021,12,31),
allowBlank: false,
name: "periodo",
invalidText : "{0} debe ser mayor a {1}",
minText : "El periodo debe ser igual o posterior a {0}"

Any idea?

Please let me know if you need more code. I think that only fails when the date is greater than 28, because if I select 02/2012 works ok.

Thanks for your help,


30 Jun 2010, 10:30 AM
2/29 is an invalid date for non leap years :) I'm not sure everyone is going to agree that this is a bug.

8 Jul 2010, 11:18 AM
Hi xantus,

You're right, but the fact is that the format is

format: 'm/Y'So why the MonthField is checking the day?
Also the object is called MonthField, so I think that the day cannot be checked

Thanks again,


edit: Sorry, I put it in the wrong forum. It should be in Ext JS Bug forum...