Looks like we can't reproduce the issue or there's a problem in the test case provided.
-
Sencha User
datepickerfield sets year to 1901
I am seeing a couple issues with the following datepickerfield configuration. First, if the earliest year is selected (in this case 2012), the year is set to 1901. Also, if you select 'done' without moving the picker the date is not set.
Code:
{
xtype: 'datepickerfield',
name : 'time',
label: 'When',
picker: {
yearFrom: (new Date()).getFullYear(),
yearTo: (new Date()).getFullYear() + 2,
}
},
-
Using this full test case:
Code:
new Ext.Container({
fullscreen : true,
items : [
{
xtype : 'datepickerfield',
name : 'time',
label : 'When',
picker : {
yearFrom : new Date().getFullYear(),
yearTo : new Date().getFullYear() + 2
}
}
]
});
I don't see 1901. The year slot shows 2012, 2013 and 2014 as expected.
-
Sencha User
i am using datepickerfield field in my project
xtype: 'datepickerfield',
picker: {
slotOrder: ['month', 'day', 'year'],
yearFrom: new Date().getFullYear() - 18,
yearTo: new Date().getFullYear() - 70,
// doneButtonText:'Next'
},
but sometimes in server logs we can see the date as 1901
after getting the date object we sent to server using ajax call
what can be the issue??