Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all
We have a form based on Contour with a DatePicker field. We've got the request to add validation to the selected date and the request says:
- If today's date is closer than 5 days to the selected date, the form should not be possible to submit.
Any ideas on how to solve this?
Jessica,
You could make the field a textfield then use jquery date picker and then set options of the jquery date picker so that 5 days close todays date not pickable.
See http://jqueryui.com/demos/datepicker/
Also see http://www.world-of-incentives.com/request-for-proposal.aspx on this site the date pickers are jquery ui date pickers although not range restricted but you can see what I have done.
Regards
Ismail
Thanks a lot! That looks very neat :-) I will try that out!
I have the code working in jsfiddle, but where should I place the script to get it to attach to the .datepickerfield on my form.
I tried looking in the source code, to use both the ID or the class of the field, but it doesn't work. The script is not even changing the field.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Extending Contour DatePicker
Hi all
We have a form based on Contour with a DatePicker field. We've got the request to add validation to the selected date and the request says:
- If today's date is closer than 5 days to the selected date, the form should not be possible to submit.
Any ideas on how to solve this?
Jessica,
You could make the field a textfield then use jquery date picker and then set options of the jquery date picker so that 5 days close todays date not pickable.
See http://jqueryui.com/demos/datepicker/
Also see http://www.world-of-incentives.com/request-for-proposal.aspx on this site the date pickers are jquery ui date pickers although not range restricted but you can see what I have done.
Regards
Ismail
Thanks a lot! That looks very neat :-) I will try that out!
I have the code working in jsfiddle, but where should I place the script to get it to attach to the .datepickerfield on my form.
I tried looking in the source code, to use both the ID or the class of the field, but it doesn't work. The script is not even changing the field.
is working on a reply...