Week selection can be configured by setting the select to 'preset-range'.
Control the parameters of the selection:
- Define the first day of the selection - Set it in the
firstSelectDayoption. It can be different than thefirstDayof the week set in localization - Define the number of days - The
selectSizeoption can be any number, where3means three days,7means a week and14means two weeks
Looking to select a range with custom start/end dates? See how start/end selection works →
Demo
First day of the selection
Number of weeks
$('#date-picker').mobiscroll().datepicker({
controls: ['calendar'],
select: 'preset-range',
firstSelectDay: 1 ,
selectSize: 7
});
JSHTML
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
$(function () {
$('#demo-week-select')
.mobiscroll()
.datepicker({
controls: ['calendar'],
select: 'preset-range',
display: 'inline',
firstSelectDay: 1,
selectSize: 14,
});
});
<div id="demo-week-select"></div>