I’m using Bootstrap Datepicker with my html input tag, which is: <input type="text" class="form-select" name="event_start_date" id="event_start_date">
which, currently, posts the date to the database without issue.
The datepicker script is:
$('#event_start_date').datepicker({
format: "dd/mm/yyyy",
clearBtn: true,
autoclose: true,
todayHighlight: true
});
What I’d like to do is use this information in the input to populate a dropdown list to show event recurrence, similar to Google Calandar, such as if the event doesn’t repeat, repeats weekly on that day, repeats monthly on that day. The dropdown would need to also have options for repeats on the first, second, third, fourth, or last day of the month depending on the date in the month chosen.
For example, if the chosen date is July 18 2024, which is a Thursday in the third week of July, the dropdown would show:
Doesn’t repeat
Weekly on Thursday
Monthly on third Thursday
The repeat info would be posted to a MySQL database for later retrieval.
I’ve tried various solutions found here on Stack Overflow, such as here, and here, and on Google, but none properly answer my question, or maybe too overcomplicated for me to understand.
MartySmartyPants is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.