Restrict DatePicker to biweekly dates

By: Eric scoles | Asked: 04/10/2024
ForumsCategory: How-toRestrict DatePicker to biweekly dates
Eric scoles asked 2 months ago

I'm working with a payroll form, for submitting time in a biweekly pay period. We need to allow people to select only the previous, current, or next period end dates. Which means that we need them to be able to pick every other Saturday. Restricting to a specific day of the week is easy enough. (Just restrict to Saturday in the Advanced field options.) By setting minimum or maximum dates against the current date, I can restrict them to only period end dates I can limit them to only the previous or next two Saturdays, which covers the specified range, but does not prevent them from entering incorrect period end dates.

My customer (our business office) needs user input to be restricted to only valid period end dates. 

I'm thinking this has to be a common problem, so what are some ways people have done this or similar things? 

[edited to correct formatting]

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right