Vote count:
0
How can I change the month of my second datepicker dynamically to display as the next month based on the first date picker selection? Example: I selected 15-10-2104 fron the first time picker.Hence the second date picker should open with the date from 1-11-2014.All the previous dates should be disabled.
I'm using angular bootstrap datepicker and heres the code:
<label>Start Date <span class="required"></span></label>
<div class="seldate startdate calender-icon nopadding">
<input type="text" datepicker-popup="dd-MMMM-yyyy"
ng-model="info.startDate"
required
name="startDate" tabindex="4"
placeholder="dd/mm/yyyy"
is-open="startDate.open"
ng-click="startDate.open = true"
min-date="minDate" datepicker-options="dateOptions"
date-disabled="disabled(date, mode)"
close-text="Close" class="form-control"/></div>
</div>
<div class="col-sm-6 form-group">
<label>End Date <span class="required"></span></label>
<div class="seldate startdate calender-icon nopadding">
<input type="text" datepicker-popup="dd-MMMM-yyyy"
ng-model="info.endDate"
required
name="endDate" tabindex="5"
placeholder="dd/mm/yyyy"
is-open="endDate.open"
ng-click="endDate.open = true"
min-date="scheduleInfo.startDate" datepicker-options="dateOptions"
date-disabled="disabled(date, mode)"
close-text="Close" class="form-control"/></div>
</div>
asked 3 mins ago
Change the month in the second date picker based on the first in angular date picker
Aucun commentaire:
Enregistrer un commentaire