search

Home  >  Q&A  >  body text

angular.js - How to restrict angular's datepicker to only select the date of the current month?

1. Now there is a requirement. When startdate is selected, enddate can only select the date of the same month. For example, if startdate selects 2016-04-21, then enddate can only select the content of April. How to set it up

2. How to delete the selection button on the calendar

为情所困为情所困2793 days ago690

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-15 17:03:03

    1. 设置minDate/maxDate

    max-date="endDate" on the startDate input
    min-date="startDate" on the endDate input


    1. 修改对应的template

    https://github.com/angular-ui/bootstrap/blob/master/template/datepicker/day.html

    templateCache key => "uib/template/datepicker/day.html"

    reply
    0
  • Cancelreply