Enable dates for every other week.

  • plott
    Asked on September 20, 2017 at 10:13 AM

    I want to build a timesheet form that will allow users to pick every other Monday - our payroll cycle is two weeks.  Then based on this, I can calculate the days offset from this period date.  Restricting to just Mondays is simple enough.  Is there a way to restrict this to just every other Monday?

  • aubreybourke
    Replied on September 20, 2017 at 11:41 AM

    I created a demo of what is possible:

    https://form.jotformpro.com/72624687657976

    Basically to provide a date picker that uses the current date. And disables all days in the week except Mondays. It also disables any past dates. Here's a screenshot:

    Enable dates for every other week Screenshot 20

    Please read this guide to further restrict your dates:

    How to Use the Date Limits Option

  • plott
    Replied on September 20, 2017 at 1:57 PM

    OK, I think I have a handle on how to use the options in the control - but now thinking outside the box a bit...

    Is it possible to have a hidden datepicker and default it to some date.  Then calculate the days between dates and only if the "Mod(date_difference, 14) = 0" enable the date.  Essentially, I only want every other Monday to be enabled.

  • aubreybourke
    Replied on September 20, 2017 at 2:22 PM

    Unfortunately no I don't think it is possible.

    It is not possible with the Date Reservation widget, Date Picker Widget, Date Time Single Widget, Mini Date Picker, or Large Date Picker. 

    I have got close with the Date Picker, & also the Dates Difference Widget.

    You can see them both here:

    https://form.jotformpro.com/72624687657976