Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jessica Nordbeck 32 posts 102 karma points
    Aug 31, 2012 @ 12:54
    Jessica Nordbeck
    0

    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? 

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Aug 31, 2012 @ 13:22
    Ismail Mayat
    1

    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

  • Jessica Nordbeck 32 posts 102 karma points
    Aug 31, 2012 @ 15:25
    Jessica Nordbeck
    0

    Thanks a lot! That looks very neat :-) I will try that out!

  • Ryan Green 63 posts 83 karma points
    Jan 22, 2014 @ 19:18
    Ryan Green
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft