Nov 02, 2012, 1:45 PM
[CLOSED] Bug in Date Range Example
Hello my fellow members.
I am new to ext.net, and are working with ext.net at work and i must say i am very pleased with this framework, very smooth and nice to implement.
On Topic.
Ind the exsample From - To - Range
it appers there is a bug or code error in this section..
if it has to work as intendet in the exsample.
You also need to put "v" as a argument in the methods setMaxValue and setMinValue in order for the invalide dates to be grayed out.
like so:
Hope this help.
Bedst regards
Akpenob..
I am new to ext.net, and are working with ext.net at work and i must say i am very pleased with this framework, very smooth and nice to implement.
On Topic.
Ind the exsample From - To - Range
it appers there is a bug or code error in this section..
var onKeyUp = function (field) {
var v = this.getRawValue(),
field;
if (this.startDateField) {
field = Ext.getCmp(this.startDateField);
field.setMaxValue();
this.dateRangeMax = null;
} else if (this.endDateField) {
field = Ext.getCmp(this.endDateField);
field.setMinValue();
this.dateRangeMin = null;
}
field.validate();
};
I have found out that in order to have this code ristrict the date between the chosen dates, you have to set the listener on blur insted of keyUp event,if it has to work as intendet in the exsample.
You also need to put "v" as a argument in the methods setMaxValue and setMinValue in order for the invalide dates to be grayed out.
like so:
var onKeyUp = function (field) {
var v = this.getRawValue(),
field;
if (this.startDateField) {
field = Ext.getCmp(this.startDateField);
field.setMaxValue(v);
this.dateRangeMax = null;
} else if (this.endDateField) {
field = Ext.getCmp(this.endDateField);
field.setMinValue(v);
this.dateRangeMin = null;
}
field.validate();
};
Dont know if it is me who is wrong or its a bug...?Hope this help.
Bedst regards
Akpenob..
Last edited by Daniil; Nov 08, 2012 at 9:14 AM.
Reason: [CLOSED]