0

How to count & subtract number of months from datepicker using jquery ajax? I want to add or subtract num. of months from these two Input Start Date & End Date but not working. So, How to add or difference b/t from this input? This is my cdn-

        <link id="bsdp-css" href="https://unpkg.com/bootstrap-datepicker@1.9.0/dist/css/bootstrap-datepicker3.min.css" rel="stylesheet">
        <script src="https://unpkg.com/bootstrap-datepicker@1.9.0/dist/js/bootstrap-datepicker.min.js"></script>

This is my HTML UI Code-

                        <div class="form-group">
                            <label class="control-label col-md-12">Start Date</label>
                                <input type="text" name="exp_start_date" id="exp_start_date" class="form-control datepicker"
                                    autocomplete="off" />
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-12">End Date</label>
                                <input type="text" name="exp_end_date" id="exp_end_date" class="form-control datepicker"
                                    autocomplete="off" />
                        </div>

This is my Script for input months & years-

        <script>
        $(".datepicker").datepicker( {
            format: "MM-yyyy",
            startView: "months", 
            minViewMode: "months"
        });
        </script>
AJAY KUMAR
  • 31
  • 1
  • 6
  • See if this helps: https://stackoverflow.com/a/2609579/3279876 – Sami Jan 20 '22 at 09:55
  • Does this answer your question? [JQuery Calculate Day Difference in 2 date textboxes](https://stackoverflow.com/questions/2609513/jquery-calculate-day-difference-in-2-date-textboxes) – paulsm4 Oct 15 '22 at 16:05

0 Answers0