Any one help me for this dobpicker plugins

I integrate this plugin into my project. So they want show the add +15 day next date for the current date. how can change the plugin code Please help me .
following plugin link:
I appreciate any help form you!

I wonder what is your application. Booking a two week vacation perhaps? Maybe using jQuery UI Date picker might better. Examples:

To Use the picker you stated in your question I would copy the “disable months” and “disable years” sections then paste them onto the end. I would then edit these to account for exceeding the last day of the month. So when there are 28 days in February then if date >= 14 add one to the month and subtract 28 from the sum of date plus 15.

well, i didn’t get perfect solution for me,The below my app UI

Let me explain if today’s date is 20 apirl 2021 then user only enter +15 days after the current date. if any logic suggestion Please !!

In pseudo code:

 if month == 4 and day > 15
        day = (day + 15) - 30;
        month = month +1;

You have 12 more cases for which to write because February can have two different lengths.

If I remember correctly, the code uses the ternary operator ( which is shorthand for if...then ) to test for the length of the months. Which is why I suggested to copy paste those sections then do your +15 math after each test.

If you want to thoroughly understand it, rewrite the plugin using if... then.

thanks, @tlc35us i have check the server side validation so no need the change in the front end code. Thanks again :relaxed:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.