Datetimepicker count and mark next working days

Asked

Viewed 210 times

1

Good morning!

I have a big problem, I use the Bootstrap Datetimepicker to include a calendar just above a stopwatch on an html page, but now it has been requested that in this calendar, the next 5 working days after the current day were demarcated so that the correct date is passed to the customer who contacted us.

I’m still starting in java development and, related to php I don’t have enough knowledge, besides the fact that the server I use to upload files work as an intranet, where this barring any kind of display/ return referring to PHP files.

the code I am using in the datetimepicker is as follows:

   /* Calendário com Feriados Nacionais */
    $(function () {
            $('#datetimepicker1').datetimepicker({
                locale: 'pt-br',
                format:'L',
                daysOfWeekDisabled: [0, 6],
                disabledDates: [ 
                    "1/1/2018",
                    "2/12/2018",
                    "2/13/2018",
                    "3/30/2018",
                    "4/21/2018",
                    "5/1/2018",
                    "5/31/2018",
                    "9/7/2018",
                    "10/12/2018",
                    "11/2/2018",
                    "11/15/2018",
                    "12/25/2018",

                    "1/1/2019",
                    "3/4/2019",
                    "3/5/2019",
                    "4/14/2019",
                    "4/21/2019",
                    "5/1/2019",
                    "6/20/2019",
                    "9/7/2019",
                    "10/12/2019",
                    "11/2/2019",
                    "11/15/2019",
                    "12/25/2019",                        

                    "1/1/2020",
                    "2/24/2020",
                    "2/25/2020",
                    "4/10/2020",
                    "4/21/2020",
                    "5/1/2020",
                    "6/11/2020",
                    "9/7/2020",
                    "10/12/2020",
                    "11/2/2020",
                    "11/15/2020",
                    "12/25/2020",   

                    "1/1/2021",
                    "2/15/2021",
                    "2/16/2021",
                    "4/2/2021",
                    "4/21/2021",
                    "5/1/2021",
                    "6/3/2021",
                    "9/7/2021",
                    "10/12/2021",
                    "11/2/2021",
                    "11/15/2021",
                    "12/25/2021",     

                    "1/1/2022",
                    "2/28/2022",
                    "2/29/2022",
                    "4/15/2022",
                    "4/21/2022",
                    "5/1/2022",
                    "6//2022",
                    "9/7/2022",
                    "10/12/2022",
                    "11/2/2022",
                    "11/15/2022",
                    "12/25/2022",                          

                ],



            });
        });

Someone would know me if it is possible to make this inclusion of the 5 working days that are enabled after the current date using this plugin or it would be necessary to work with another in specific?

If it is necessary to use another plugin in specific which would be?

Thank you very much for your attention

  • don’t understand very well, you want to disable the holidays? in the future?

  • No no, I want from the present day, be accounted for 5 working days, example: I triggered the calendar today, day 04/07 Wednesday, I would need the days 05,06,09,10 and 11 were marked bag?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.