Hi,
I have 2 date prompts in my Report Start Date,End date and 2 search select prompt (productline and product type)
If the user selects Start date> current date or End Date > current date then
a pop message should Popup saying
'Please select start date lessthan current date End date less than current date'
Thanks,
Dhanu :)
Hello Dhanu ,
A sample script that you can follow to get your work done is given below :
<script>
var fw=getFormWarpRequest();
fw.txtDatep_date.onchange=function() { /// assumign the date prompt name is "p_date" and UI is "Edit Box"
var dt1=new Date(fw.txtDatep_date.value);
if (dt1 > new Date() ){ // new Date() gives the current Day value as default
alert ('error');
}
}
</script>
** the onchange event doest seem to be fired when date is selected through a calendar , It works when user manually types in the date at the date prompt.
Thanks rprameshwor!
as you said it work when user enter the date in edit box manually.
is there any way that can restrict the date not greater than current date from calendar prompt.
kindly let me know .