Date selection
The date picker ships with five built-in variations for rendering the UI. The controls option supports the following:
date- renders a date-only scroller or dropdown controltime- renders a time-only scroller or dropdown controltimegrid- renders a time grid for time selectiondatetime- renders a date & time scroller or dropdowncalendar- renders a calendar view for date picking
When passing controls: ['date'], the date picker will render a date-only picker - scroller for touchUi: true and a dropdown for touchUi: false.
You can further customize the dateFormat and dateWheels to fine-tune the UX... use it as a credit card expiration picker.
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
mobiscroll.datepicker('#demo-date', {
controls: ['date'],
});
mobiscroll.datepicker('#demo-month-year', {
controls: ['date'],
dateFormat: 'MM/YYYY',
dateWheels: 'MMMM YYYY',
});
<label>
Date picker
<input id="demo-date" mbsc-input data-input-style="outline" data-label-style="stacked" placeholder="Please select..." />
</label>
<label>
Month & year picker
<input id="demo-month-year" mbsc-input data-input-style="outline" data-label-style="stacked" placeholder="Please select..." />
</label>