BUG 8735 Calendar no guarda los cambios esto pasa en Holidays SOLVED
- en realidad solo ocurre al momento de editar las fechas de la grilla holydays - se soluciono este problema cambiando la manera validar el rango de fechas validas para este proposito
This commit is contained in:
@@ -487,33 +487,7 @@ Ext.onReady( function() {
|
|||||||
var editorHoliday = new Ext.ux.grid.RowEditor( {
|
var editorHoliday = new Ext.ux.grid.RowEditor( {
|
||||||
saveText: 'Update'
|
saveText: 'Update'
|
||||||
} );
|
} );
|
||||||
//for range of dates
|
|
||||||
Ext.apply(Ext.form.VTypes, {
|
|
||||||
daterange : function(val, field) {
|
|
||||||
var date = field.parseDate(val);
|
|
||||||
|
|
||||||
if(!date){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (field.startDateField && (!this.dateRangeMax || (date.getTime() != this.dateRangeMax.getTime()))) {
|
|
||||||
var start = Ext.getCmp(field.startDateField);
|
|
||||||
start.setMaxValue(date);
|
|
||||||
start.validate();
|
|
||||||
this.dateRangeMax = date;
|
|
||||||
}
|
|
||||||
else if (field.endDateField && (!this.dateRangeMin || (date.getTime() != this.dateRangeMin.getTime()))) {
|
|
||||||
var end = Ext.getCmp(field.endDateField);
|
|
||||||
end.setMinValue(date);
|
|
||||||
end.validate();
|
|
||||||
this.dateRangeMin = date;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Always return true since we're only using this vtype to set the
|
|
||||||
* min/max allowed values (these are tested for after the vtype test)
|
|
||||||
*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
gridHoliday = new Ext.grid.GridPanel( { //grid holidays
|
gridHoliday = new Ext.grid.GridPanel( { //grid holidays
|
||||||
store: storeHoliday ,
|
store: storeHoliday ,
|
||||||
@@ -585,11 +559,11 @@ Ext.onReady( function() {
|
|||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
id: 'startdt',
|
id: 'startdt',
|
||||||
name: 'startdt',
|
name: 'startdt',
|
||||||
vtype: 'daterange',
|
listeners: {
|
||||||
endDateField: 'enddt'// id of the 'To' date field
|
change: function () {
|
||||||
//minValue: '01/01/2006',
|
Ext.getCmp('enddt').setMinValue(Ext.getCmp('startdt').value);
|
||||||
// minText: 'Can\'t have a start date before of the 2006!'
|
}
|
||||||
//maxValue: (new Date()).format('m/d/Y')
|
}
|
||||||
}
|
}
|
||||||
} ,
|
} ,
|
||||||
{
|
{
|
||||||
@@ -605,11 +579,11 @@ Ext.onReady( function() {
|
|||||||
id: 'enddt',
|
id: 'enddt',
|
||||||
name: 'enddt',
|
name: 'enddt',
|
||||||
allowBlank: true,
|
allowBlank: true,
|
||||||
vtype: 'daterange',
|
listeners: {
|
||||||
startDateField: 'startdt'// id of the 'From' date field
|
change: function () {
|
||||||
// minValue: '01/01/2006',
|
Ext.getCmp('startdt').setMaxValue(Ext.getCmp('enddt').value);
|
||||||
// minText: 'Can\'t have a start date before of the 2006!'
|
}
|
||||||
//maxValue: (new Date()).format('m/d/Y')
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user