Date & time 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
Use controls: ['datetime'] for rendering a date & time picker within the same control, tied to the same input, or use them separately for two inputs - controls: ['date'] and controls: ['time']. It will render a scrollers for touchUi: true and a dropdowns for touchUi: false.
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
mobiscroll.datepicker('#demo-compact', {
controls: ['datetime'],
});
mobiscroll.datepicker('#demo-expanded', {
controls: ['date', 'time'],
});
mobiscroll.datepicker('#demo-date', {
controls: ['date'],
});
mobiscroll.datepicker('#demo-time', {
controls: ['time'],
});
<label>
Compact date & time picker
<input id="demo-compact" mbsc-input data-input-style="outline" data-label-style="stacked" placeholder="Please select..." />
</label>
<label>
Expanded date & time picker
<input id="demo-expanded" mbsc-input data-input-style="outline" data-label-style="stacked" placeholder="Please select..." />
</label>
<div class="mbsc-grid mbsc-no-padding">
<div class="mbsc-row">
<div class="mbsc-col-6">
<label>
Date
<input id="demo-date" mbsc-input data-input-style="outline" data-label-style="stacked" placeholder="Please select..." />
</label>
</div>
<div class="mbsc-col-6">
<label>
Time
<input id="demo-time" mbsc-input data-input-style="outline" data-label-style="stacked" placeholder="Please select..." />
</label>
</div>
</div>
</div>