javascript - How to disable past dates from Bootstrap Datepaginator -
how disable past dates bootstrap datepaginator, want show pagination current date , disable past dates
take @ documentation - https://github.com/jonmiles/bootstrap-datepaginator. looks want use startdate
option.
var options = { startdate: '2015-07-30' } $('#paginator').datepaginator(options);
the option either take string (as in example), or moment
object (http://momentjs.com/). suggest using moment makes working date objects super easy, , in general addition project works dates. moment()
return todays date, re-write above example follows;
var options = { startdate: moment() } $('#paginator').datepaginator(options);
Comments
Post a Comment