Date Restrictions
Configuring minimum and maximum selectable values is great for reducing mistakes. Help people by limiting the selections for the task at hand. Use the min and max options to restrict the selection. Setting the values will disable dates/times earlier than min and dates/times that come after max.
By default these options are empty and the date picker supports infinite navigation, while the time picker has all 24 hours/60 minutes/... available for selection. Values can be passed as JS date objects, ISO date strings or Moment.js objects.
Demo
var now = new Date();
mobiscroll.datepicker('#datepicker', {
controls: ['calendar '],
select: 'range',
min: ' ' ,
max: ' ' ,
min: now,
max: new Date(now.getFullYear(), now.getMonth() + 6, now.getDate())
}); mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
mobiscroll.datepicker('#demo-date', {
controls: ['calendar'],
select: 'range',
display: 'inline',
min: '1920-01-01',
max: '2050-01-01',
});
mobiscroll.datepicker('#demo-datetime', {
controls: ['calendar', 'time'],
select: 'range',
display: 'inline',
min: '2000-01-01T12:00',
max: '2050-01-01T12:00',
});
<div id="demo-date"></div>
<div id="demo-datetime"></div>