Hi,
I would like to filter fromDate and toDate.
when i am doing search with fromDate as Jan -30-2017 and toDate as Feb-01-2017 it is showing a message "ToDate" Cannot be less than "FromDate".
Note:
Senario 1: For Every year search for particularly Jan-30 To Feb-01.
Senario 2: For Every year search for particularly Jan-31 To Feb-01.
In other cases working fine.
ValidateDate(fromDate,toDate){
var pDay=parseInt(toDtae.substring(0,2),10);
var pMon=parseInt(toDtae.substring(0,2),10);
var pYear=parseInt(toDtae.substring(0,2),10);
var pDate=new Date(pYear,pMon,pDay);
var oDay=parseInt(toDtae.substring(0,2),10);
var oMon=parseInt(toDtae.substring(0,2),10);
var oYear=parseInt(toDtae.substring(0,2),10);
var oDate=new Date(oYear,oMon,oDay);
if(pDate<oDate){
confirm('<s:Text name="labe.dateerrorMessage"/>')
documentation("okButton").disabled=true;
}
}
whenever i am searching fromDate Jan 30/31 to Feb 01 for Every year it is showing
"ToDate" Cannot be less than "FromDate".
Example: fromDate:jan302017
toDate:Feb012017
selection is ahppening through Calander.
What I have tried:
ValidateDate(fromDate,toDate){
var pDay=parseInt(toDtae.substring(0,2),10);
var pMon=parseInt(toDtae.substring(0,2),10);
var pYear=parseInt(toDtae.substring(0,2),10);
var pDate=new Date(pYear,pMon,pDay);
var oDay=parseInt(toDtae.substring(0,2),10);
var oMon=parseInt(toDtae.substring(0,2),10);
var oYear=parseInt(toDtae.substring(0,2),10);
var oDate=new Date(oYear,oMon,oDay);
if(pDate<oDate){
confirm('<s:Text name="labe.dateerrorMessage"/>')
documentation("okButton").disabled=true;
}
}