Custom Date & Time Format
Use the dateFormat, timeFormat options to customize how the values show up in the inputs after selection. If the formats are not explicitly set, they are inherited from the localization settings.
Besides customizing the date and time formats you can reorder the time picker wheels and change its formats with the timeWheels options.
Interested in learning about localization? Check out how the return format changes based on locale →
Demo
{
controls: ['calendar']
}
{
controls: ['calendar'],
dateFormat: 'DD.MM.YYYY'
}
{
controls: ['calendar'],
dateFormat: 'D MMMM YYYY'
}
{
controls: ['calendar'],
dateFormat: 'DDD DD MMM, YYYY'
}
{
controls: ['calendar'],
dateFormat: 'YYYY-MM-DD'
}
{
controls: ['calendar'],
dateFormat: 'DDD, DD MMM YYYY'
}
{
controls: ['time']
}
{
controls: ['time'],
timeFormat: 'hh:mm A'
}
{
controls: ['time'],
timeFormat: 'HH:mm'
}
{
controls: ['time'],
timeFormat: 'HH:mm:ss'
}
{
controls: ['calendar', 'time'],
timeFormat: 'HH:mm:ss'
}
{
controls: ['calendar', 'time'],
dateFormat: 'DDD D MMM, YYYY',
timeFormat: 'H:mm',
dateWheels: '|DDD D MMM, YYYY|'
}
JSHTML
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
var currentWeek = ['2026-10-21T00:00', '2026-10-27T00:00'];
var currentHour = ['2026-10-21T15:00', '2026-10-21T17:00'];
mobiscroll.datepicker('#demo-date-def', {
controls: ['calendar'],
select: 'range',
onInit: function (event, inst) {
inst.setVal(currentWeek, true);
},
});
mobiscroll.datepicker('#demo-date-sep', {
controls: ['calendar'],
select: 'range',
dateFormat: 'DD.MM.YYYY',
onInit: function (event, inst) {
inst.setVal(currentWeek, true);
},
});
mobiscroll.datepicker('#demo-date-month', {
controls: ['calendar'],
select: 'range',
dateFormat: 'D MMMM YYYY',
onInit: function (event, inst) {
inst.setVal(currentWeek, true);
},
});
mobiscroll.datepicker('#demo-date-day', {
controls: ['calendar'],
select: 'range',
dateFormat: 'DDD DD MMM, YYYY',
onInit: function (event, inst) {
inst.setVal(currentWeek, true);
},
});
mobiscroll.datepicker('#demo-date-atom', {
controls: ['calendar'],
select: 'range',
dateFormat: 'YYYY-MM-DD',
onInit: function (event, inst) {
inst.setVal(currentWeek, true);
},
});
mobiscroll.datepicker('#demo-date-cookie', {
controls: ['calendar'],
select: 'range',
dateFormat: 'DDD, DD MMM YYYY',
onInit: function (event, inst) {
inst.setVal(currentWeek, true);
},
});
mobiscroll.datepicker('#demo-time-def', {
controls: ['time'],
select: 'range',
onInit: function (event, inst) {
inst.setVal(currentHour, true);
},
});
mobiscroll.datepicker('#demo-time-12h', {
controls: ['time'],
select: 'range',
timeFormat: 'hh:mm A',
onInit: function (event, inst) {
inst.setVal(currentHour, true);
},
});
mobiscroll.datepicker('#demo-time-24h', {
controls: ['time'],
select: 'range',
timeFormat: 'HH:mm',
onInit: function (event, inst) {
inst.setVal(currentHour, true);
},
});
mobiscroll.datepicker('#demo-time-hms', {
controls: ['time'],
select: 'range',
timeFormat: 'HH:mm:ss',
onInit: function (event, inst) {
inst.setVal(currentHour, true);
},
});
mobiscroll.datepicker('#demo-datetime-def', {
controls: ['calendar', 'time'],
select: 'range',
onInit: function (event, inst) {
inst.setVal(currentHour, true);
},
});
mobiscroll.datepicker('#demo-datetime-day', {
controls: ['calendar', 'time'],
select: 'range',
dateFormat: 'DDD D MMM, YYYY',
timeFormat: 'H:mm',
dateWheels: '|DDD D MMM, YYYY|',
onInit: function (event, inst) {
inst.setVal(currentHour, true);
},
});
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Date</div>
<label>
Default
<input mbsc-input id="demo-date-def" />
</label>
<label>
Separator
<input mbsc-input id="demo-date-sep" />
</label>
<label>
Month name
<input mbsc-input id="demo-date-month" />
</label>
<label>
Day of week
<input mbsc-input id="demo-date-day" />
</label>
<label>
ATOM
<input mbsc-input id="demo-date-atom" />
</label>
<label>
COOKIE
<input mbsc-input id="demo-date-cookie" />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Time</div>
<label>
Default
<input mbsc-input id="demo-time-def" />
</label>
<label>
12 h
<input mbsc-input id="demo-time-12h" />
</label>
<label>
24 h
<input mbsc-input id="demo-time-24h" />
</label>
<label>
Hour, min, sec
<input mbsc-input id="demo-time-hms" />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Date & Time</div>
<label>
Default
<input mbsc-input id="demo-datetime-def" />
</label>
<label>
Day name
<input mbsc-input id="demo-datetime-day" />
</label>
</div>