Dates for Booking

  • Profile Image
    Villalumiabali
    Asked on February 17, 2014 at 02:12 AM

    Hi,

     

    In my form I am using dates for people to show when they would like to book a property. I have then 2 fields with dates. The only issue is that I do not have the option to (or I have not found it) have the 2nd date >= the first date.

     

    For example if people indicate "From: April 1st 2014" I do not want them to be able to have "To: March 1st 2014"

     

    Is this possible ?

     

    Thanks

  • Profile Image
    datasphere
    Answered on February 17, 2014 at 05:19 AM

    Hi Villalumiabali

    It is possible but with workarounds in the source code :

     Here is how to get the source code: How to get your form source code

    To accomplish what you need you would require to inject some code that will do the calculation  in yourt case preventing the calendar of seleting dates in the second field prior than {TODAY}   - using Javascript or PHP codes. 

    Take look at this maybe it would help you and give you idea on what to do:

    http://filamentgroup.com/lab/update_date_range_picker_with_jquery_ui_archived/

     

    or maybe you preffer CSS bootstrap date picker:

    http://bootstrap-datepicker.readthedocs.org/en/release/

    Regards,

    Damir