Angular JS Range
Range for Angular JS and Ionic 1
Range for Angular JS and Ionic 1
Range for Angular JS and Ionic 1
Learn more
A goto solution for picking date and time ranges. Date-only, time-only or mixed date & time modes are supported. You can use it with one or two inputs for start and end range.
Can be used as a component along with other mobiscroll form elements or as a directive on any input or field.
Shipping with useful features for a great UX, including:
- Usage on mobile and desktop with responsive features
- Date, time or date & time ranges
- Calendar view or scroller controls
- Usage on mobile and desktop with responsive features
- Validation with disabled dates, min & max for restricting selection
- Marked, colored days and day labels
- Variable week view
- Multiple month view
- Week counter
- Fullscreen, modal, popup and inline display support
- RTL Support
- Full localization
Interested in date and/or time selection? Other demos that could be useful:
Date & Time Range demos available for other frameworks.
Viewing demos & code for
Range - Date range
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date(),
week = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6, 23, 59)];
$scope.external = week;
$scope.rangeSettings = {
startInput: '#start',
endInput: '#end'
};
$scope.dateSettings = {
startInput: '#startDate',
endInput: '#endDate',
controls: ['date']
};
$scope.nonFormSettings = {
showSelector: false
};
$scope.externalSettings = {
theme: '',
themeVariant: '',
lang: '',
showOnTap: false,
showOnFocus: false,
showSelector: false
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">The range can be used inside a mobiscroll form or on any input.</div>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Two inputs inside Mobiscroll Form</div>
<label>
From
<input mbsc-input id="start" placeholder="Please Select ..." readonly/>
</label>
<label>
Until
<input mbsc-input id="end" placeholder="Please Select ..." readonly/>
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Date scroller</div>
<label>
From
<input mbsc-input id="startDate" placeholder="Please Select ..." readonly/>
</label>
<label>
Until
<input mbsc-input id="endDate" placeholder="Please Select ..." readonly/>
</label>
</div>
<div ng-model="range" mobiscroll-range="rangeSettings"></div>
<div ng-model="date" mobiscroll-range="dateSettings"></div>
<div class="mbsc-form-group mbsc-padding">
<p class="mbsc-thin">Use it on any input or non-mobiscroll form.</p>
</div>
</div>
<div class="demo-container">
<label for="demo-non-form">Range</label>
<input id="demo-non-form" ng-model="nonform" mobiscroll-range="nonFormSettings" class="demo-non-form" placeholder="Please Select..." />
<label for="demo-external">External button</label>
<div class="external-container">
<input id="demo-external" ng-model="external" mobiscroll-range="externalSettings" mobiscroll-instance="demoExternal" class="demo-non-form" />
<button ng-click="demoExternal.show()" class="external-button">Show</button>
</div>
</div>
</div>
.demo-non-form {
color: initial;
width: 100%;
padding: 10px;
margin: 6px 0 12px 0;
border: 1px solid #ccc;
border-radius: 0;
font-family: arial, verdana, sans-serif;
font-size: 14px;
box-sizing: border-box;
-webkit-appearance: none;
}
.demo-container {
padding: 0 1em;
}
.external-container {
display: flex;
}
.external-container button.external-button {
font-weight: 400;
padding: 10px;
margin: 6px 0 12px 16px;
}
Range - Time range
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date(),
twoHours = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes() + 120)];
$scope.external = twoHours;
$scope.rangeSettings = {
startInput: '#startTime',
endInput: '#endTime',
controls: ['time']
};
$scope.nonFormSettings = {
controls: ['time']
};
$scope.externalSettings = {
controls: ['time'],
showOnTap: false,
showOnFocus: false,
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">The range can be used inside a mobiscroll form or on any input.</div>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Two inputs inside Mobiscroll Form</div>
<label>
From
<input mbsc-input id="startTime" placeholder="Please Select ..." readonly/>
</label>
<label>
Until
<input mbsc-input id="endTime" placeholder="Please Select ..." readonly/>
</label>
</div>
<div ng-model="range" mobiscroll-range="rangeSettings"></div>
<div class="mbsc-form-group mbsc-padding">
<p class="mbsc-thin">Use it on any input or non-mobiscroll form.</p>
</div>
</div>
<div class="demo-container">
<label for="demo-non-form">Range</label>
<input id="demo-non-form" ng-model="nonform" mobiscroll-range="nonFormSettings" class="demo-non-form" placeholder="Please Select..." />
<label for="demo-external">External button</label>
<div class="external-container">
<input id="demo-external" ng-model="external" mobiscroll-range="externalSettings" mobiscroll-instance="demoExternal" class="demo-non-form" />
<button ng-click="demoExternal.show()" class="external-button">Show</button>
</div>
</div>
</div>
.demo-non-form {
color: initial;
width: 100%;
padding: 10px;
margin: 6px 0 12px 0;
border: 1px solid #ccc;
border-radius: 0;
font-family: arial, verdana, sans-serif;
font-size: 14px;
box-sizing: border-box;
-webkit-appearance: none;
}
.demo-container {
padding: 0 1em;
}
.external-container {
display: flex;
}
.external-container button.external-button {
font-weight: 400;
padding: 10px;
margin: 6px 0 12px 16px;
}
Range - Date and time range
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date(),
week = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6, 23, 59)];
$scope.val = week;
$scope.rangeVal = week;
$scope.demo = {
controls: ['calendar', 'time'],
startInput: '#startDate',
endInput: '#endDate'
};
$scope.range = {
startInput: '#startRange',
endInput: '#endRange',
controls: ['date', 'time'],
dateWheels: '|D M d|',
cssClass: 'scroller-range'
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Calendar</div>
<label>
From
<input mbsc-input id="startDate" readonly/>
</label>
<label>
Until
<input mbsc-input id="endDate" readonly/>
</label>
</div>
<div ng-model="val" mobiscroll-range="demo"></div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Scroller</div>
<label>
Range start
<input mbsc-input id="startRange" readonly/>
</label>
<label>
Range end
<input mbsc-input id="endRange" readonly/>
</label>
</div>
<div ng-model="rangeVal" mobiscroll-range="range"></div>
</div>
</div>
.scroller-range .mbsc-cal-tabs {
display: none;
}
/* Temporary fix */
.mbsc-cal-tabbed .mbsc-sc-whl-gr-c {
width: auto;
right: 0;
}
.mbsc-cal-tabbed .mbsc-sc-whl-gr {
width: auto;
}
Range - Min and Max
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date(),
yesterday = new Date(new Date().setDate(new Date().getDate() - 1)),
tomorrow = new Date(new Date().setDate(new Date().getDate() + 1)),
nextMonths = new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()),
day = 24 * 60 * 60 * 1000;
$scope.demoSettings = {
max: yesterday
};
$scope.futureSettings = {
min: tomorrow
};
$scope.nextSettings = {
max: nextMonths,
min: tomorrow
};
$scope.timeSettings = {
controls: ['time'],
min: '08:00',
max: '18:59'
};
$scope.minSettings = {
minRange: 5 * day
};
$scope.maxSettings = {
maxRange: 10 * day
};
$scope.minmaxSettings = {
minRange: 5 * day,
maxRange: 10 * day
};
$scope.dateStrSettings = {
max: '2018-08-31T00:00',
min: '08/01/2018'
};
$scope.momentSettings = {
max: moment([2018, 8, 30]),
min: moment([2018, 8, 1])
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Pick a range</div>
<label>
Past range
<input mbsc-input ng-model="demo" mobiscroll-range="demoSettings" placeholder="Please Select..." />
</label>
<label>
Future range
<input mbsc-input ng-model="future" mobiscroll-range="futureSettings" placeholder="Please Select..." />
</label>
<label>
Next 6 months
<input mbsc-input ng-model="next" mobiscroll-range="nextSettings" placeholder="Please Select..." />
</label>
<label>
Time range
<input mbsc-input ng-model="timerange" mobiscroll-range="timeSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Specify range length</div>
<label>
Min 5 days
<input mbsc-input ng-model="min" mobiscroll-range="minSettings" placeholder="Please Select..." />
</label>
<label>
Max 10 days
<input mbsc-input ng-model="max" mobiscroll-range="maxSettings" placeholder="Please Select..." />
</label>
<label>
5-10 days
<input mbsc-input ng-model="minmax" mobiscroll-range="minmaxSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Date formats</div>
<label>
String
<input mbsc-input ng-model="dateStr" mobiscroll-range="dateStrSettings" placeholder="Please Select..." />
</label>
<label>
Moment JS
<input mbsc-input ng-model="moment" mobiscroll-range="momentSettings" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
Range - Invalid days
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.demoSettings = {
invalid: [
new Date(2018, 1, 3),
new Date(2018, 1, 11),
new Date(2018, 1, 12)
],
defaultValue: [new Date(2018, 1, 17), new Date(2018, 1, 23)]
};
$scope.weekSettings = {
invalid: [
'w0',
'w6'
]
};
$scope.daterangeSettings = {
invalid: [
{ start: new Date(2018, 1, 3), end: new Date(2018, 1, 9) },
{ start: new Date(2018, 1, 24), end: new Date(2018, 2, 2) }
],
defaultValue: [new Date(2018, 1, 17), new Date(2018, 1, 23)]
};
$scope.scrollerSettings = {
invalid: [
'w0',
'w6'
],
controls: ['date'],
defaultValue: [new Date(2018, 1, 17), new Date(2018, 1, 23)]
};
$scope.timeSettings = {
controls: ['time'],
steps: {
minute: 30
},
invalid: [
{ d: new Date(), start: '10:00', end: '10:00' },
{ d: new Date(), start: '10:30', end: '10:30' },
{ d: new Date(), start: '11:00', end: '11:00' },
{ d: new Date(), start: '12:30', end: '12:30' }
]
};
$scope.dateValSettings = {
defaultValue: [new Date(2018, 11, 13), new Date(2018, 11, 19)],
invalid: [
{ start: new Date(2018, 11, 20), end: new Date(2018, 11, 31) }
],
valid: [
{ start: new Date(2018, 11, 24), end: new Date(2018, 11, 26) }
]
};
$scope.timeValSettings = {
controls: ['time'],
defaultValue: [new Date(new Date().setHours(12, 30, 0, 0)), new Date(new Date().setHours(12, 59, 0, 0))],
invalid: [
{ start: '13:00', end: '20:00' }
],
valid: [
{ start: '17:00', end: '17:30' },
{ start: '18:00', end: '18:30' }
]
};
$scope.dateStrSettings = {
defaultValue: ['2018-07-15T00:00', '2018-07-15T00:00'],
invalid: [
'2018-07-08T00:00',
'2018-07-10T00:00',
'07/19/2018',
'07/23/2018'
]
};
$scope.momentSettings = {
defaultValue: [moment([2018, 8, 24]), moment([2018, 8, 24])],
invalid: [
moment([2018, 8, 11]),
moment([2018, 8, 15])
]
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Invalidating Dates</div>
<label>
Exact date
<input mbsc-input ng-model="demo" mobiscroll-range="demoSettings" placeholder="Please Select..." />
</label>
<label>
Weekdays
<input mbsc-input ng-model="week" mobiscroll-range="weekSettings" placeholder="Please Select..." />
</label>
<label>
Ranges
<input mbsc-input ng-model="daterange" mobiscroll-range="daterangeSettings" placeholder="Please Select..." />
</label>
<label>
Scroller
<input mbsc-input ng-model="scroller" mobiscroll-range="scrollerSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Invalidating Time</div>
<label>
Exact
<input mbsc-input ng-model="time" mobiscroll-range="timeSettings" placeholder="Please Select..." />
</label>
<label>
Range
<input mbsc-input ng-model="timerange" mobiscroll-range="timerangeSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Overriding inside invalid ranges</div>
<label>
Date
<input mbsc-input ng-model="dateVal" mobiscroll-range="dateValSettings" placeholder="Please Select..." />
</label>
<label>
Time
<input mbsc-input ng-model="timeVal" mobiscroll-range="timeValSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Date formats</div>
<label>
String
<input mbsc-input ng-model="dateStr" mobiscroll-range="dateStrSettings" placeholder="Please Select..." />
</label>
<label>
Moment JS
<input mbsc-input ng-model="moment" mobiscroll-range="momentSettings" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
Range - Scroll direction
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.settingsVertical = {
calendarScroll: 'vertical'
};
$scope.settingsHorizontal = {
calendarScroll: 'horizontal'
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form="formSettings">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Month change direction</div>
<label>
Vertical
<input mbsc-input ng-model="vertical" mobiscroll-range="settingsVertical" placeholder="Please Select..." />
</label>
<label>
Horizontal
<input mbsc-input ng-model="horizontal" mobiscroll-range="settingsHorizontal" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
Range - RTL Support
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.arabicSettings = {
lang: 'ar'
};
$scope.hebrewSettings = {
lang: 'he'
};
$scope.farsiSettings = {
lang: 'fa'
};
$scope.rtlSettings = {
rtl: true
};
$scope.formSettings = {
rtl: true
}
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form="formSettings">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">RTL enabled by default</div>
<label>
Arabic
<input mbsc-input ng-model="arabic" mobiscroll-range="arabicSettings" placeholder="Please Select..." />
</label>
<label>
Hebrew
<input mbsc-input ng-model="hebrew" mobiscroll-range="hebrewSettings" placeholder="Please Select..." />
</label>
<label>
Farsi
<input mbsc-input ng-model="farsi" mobiscroll-range="farsiSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Manually set RTL</div>
<label>
RTL
<input mbsc-input ng-model="rtl" mobiscroll-range="rtlSettings" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
Range - Presets
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-form', 'mobiscroll-range'])
.controller('demoController', ['$scope', function ($scope) {
var inst,
now = new Date(),
curr = new Date(),
yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1),
firstday = new Date(curr.setDate(curr.getDate() - curr.getDay())),
lastday = new Date(curr.setDate(curr.getDate() - curr.getDay() + 6)),
monday = new Date(curr.setDate(curr.getDate() - curr.getDay() + 1)),
sunday = new Date(curr.setDate(curr.getDate() - curr.getDay() + 7)),
monthStart = new Date(now.getFullYear(), now.getMonth() - 1, 1),
monthEnd = new Date(now.getFullYear(), now.getMonth(), 0);
$scope.selectedRange = [monday, sunday];
$scope.rangeSettings = {
display: 'inline',
layout: 'liquid',
defaultValue: [now, now],
showSelector: false
};
$scope.todayClick = function () {
mobiscroll.toast({
message: 'Today Selected'
});
$scope.selectedRange = [now, now];
};
$scope.yesterdayClick = function () {
mobiscroll.toast({
message: 'Yesterday Selected'
});
$scope.selectedRange = [yesterday, yesterday];
};
$scope.thisWeekClick = function () {
mobiscroll.toast({
message: 'This Week Selected'
});
$scope.selectedRange = [firstday, lastday];
};
$scope.lastMonthClick = function () {
mobiscroll.toast({
message: 'Last Month Selected'
});
$scope.selectedRange = [monthStart, monthEnd];
};
}]);
<div class="md-presets">
<div ng-app="demoApp" ng-controller="demoController" class="md-range-filter">
<div mobiscroll-form>
<h4 class="md-header">Filter Results by</h4>
<div class="mbsc-padding">
<button mbsc-button class="md-filter-btn mbsc-btn-block" ng-click="todayClick()">Today (3)</button>
<button mbsc-button class="md-filter-btn mbsc-btn-block" ng-click="yesterdayClick()">Yesterday (8)</button>
<button mbsc-button class="md-filter-btn mbsc-btn-block" ng-click="thisWeekClick()">This Week (37)</button>
<button mbsc-button class="md-filter-btn mbsc-btn-block" ng-click="lastMonthClick()">Last Month (65)</button>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Or by a custom range</div>
<div id="demo" ng-model="selectedRange" mobiscroll-range="rangeSettings" mobiscroll-instance="range"></div>
</div>
</div>
</div>
</div>
.md-range-filter .md-header {
text-align: center;
padding: 1em .75em 0 .75em;
margin: 0;
}
.md-range-filter .mbsc-form-group-title {
padding-top: 0;
text-align: center;
}
.md-range-filter .mbsc-ios .dw-dr {
height: 20px;
}
Range - Flight booking
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-form', 'mobiscroll-range', 'mobiscroll-select'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date(),
departureDate,
returnDate;
departureDate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 3);
returnDate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 7);
function setText(sel, txt) {
sel.parentNode.querySelector('input').value = txt;
}
$scope.origin = 'LTN';
$scope.destination = '';
$scope.timeRange = [departureDate, returnDate];
$scope.isOneWay = false;
$scope.tripType = 'round';
$scope.changeTripType = function (type) {
$scope.isOneWay = type;
if ($scope.isOneWay) {
$scope.timeRange = [departureDate, null];
} else {
returnDate = new Date(departureDate.getFullYear(), departureDate.getMonth(), departureDate.getDate() + 4);
$scope.timeRange = [departureDate, returnDate];
}
};
$scope.rangeSettings = {
endInput: '.md-return-date',
min: now,
showSelector: false,
onSetDate: function (event, inst) {
if ($scope.isOneWay && event.control == 'calendar' && event.active == 'start') {
inst._isVisible = false;
inst.setActiveDate('start');
inst._isVisible = true;
}
if (inst._markup) {
inst._isValid = true;
inst._markup.find('.mbsc-fr-btn-s .mbsc-fr-btn').removeClass('mbsc-fr-btn-d' + ($scope.isOneWay ? ' mbsc-disabled' : ''));
}
},
onBeforeClose: function () {
if ($scope.isOneWay) {
return true;
}
},
onSet: function (event, inst) {
var values = inst.getVal();
departureDate = values[0];
if (!$scope.isOneWay) {
returnDate = values[1];
}
}
};
$scope.selectSettings = {
multiline: 2,
height: 50,
data: {
url: 'https://trial.mobiscroll.com/airports/',
remoteFilter: true,
dataType: 'jsonp',
processResponse: function (data) {
var i,
item,
ret = [];
if (data) {
for (i = 0; i < data.length; i++) {
item = data[i];
ret.push({
value: item.code,
text: item.name,
html: '<div style="font-size:16px;line-height:18px;">' + item.name + '</div><div style="font-size:10px;line-height:12px;">' + item.location + ', ' + item.code + '</div>'
});
}
}
return ret;
}
},
filter: true,
placeholder: 'Please select'
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<label>
Round trip
<input mbsc-segmented type="radio" value="round" name="triptype" ng-model="tripType" ng-change="changeTripType(false)" checked />
</label>
<label>
One way
<input mbsc-segmented type="radio" value="oneway" name="triptype" ng-model="tripType" ng-change="changeTripType(true)" />
</label>
<div class="mbsc-form-group">
<label>
Origin
<select mbsc-dropdown mobiscroll-select="selectSettings" ng-model="origin">
<option value="LTN">London Luton</option>
</select>
</label>
<label>
Destination
<select mbsc-dropdown mobiscroll-select="selectSettings" ng-model="destination">
<option>Please select a city</option>
</select>
</label>
<label>
Leaving
<input mbsc-input type="text" class="md-leaving-date" mobiscroll-range="rangeSettings" ng-model="timeRange" />
</label>
<label>
Returning
<input mbsc-input type="text" class="md-return-date" ng-disabled="isOneWay" />
</label>
</div>
<div class="mbsc-form-group">
<label>
Adults
<span class="mbsc-desc">From 14 years</span>
<input mbsc-stepper type="number" min="1" value="1" max="15" data-val="left" />
</label>
<label>
Children
<span class="mbsc-desc">2-14 years</span>
<input mbsc-stepper type="number" max="15" data-val="left" />
</label>
<label>
Infant
<span class="mbsc-desc">0-2 years</span>
<input mbsc-stepper type="number" max="10" data-val="left" />
</label>
<label>
Economy
<input mbsc-segmented type="radio" name="flight_type" checked />
</label>
<label>
Comfort
<input mbsc-segmented type="radio" name="flight_type" />
</label>
<label>
Business
<input mbsc-segmented type="radio" name="flight_type" />
</label>
</div>
<div class="mbsc-btn-group-block">
<button mbsc-button>Find Flights</button>
</div>
</div>
</div>
/* range inputs */
.md-flight-booking .md-time-range {
overflow: hidden;
width: 99%;
}
.mbsc-ios .md-time-range {
background: #fff;
}
.md-time-range .mbsc-input {
float: left;
width: 50%;
box-sizing: border-box;
}
.mbsc-ios .md-time-range .mbsc-input {
display: block;
}
.mbsc-ios .md-time-range .mbsc-input .mbsc-label {
font-size: 14px;
padding-left: 1.14285em;
padding-top: 0.75em;
line-height: 22px;
}
Range - New event
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-form', 'mobiscroll-select', 'mobiscroll-range'])
.controller('demoController', ['$scope', function ($scope) {
$scope.rangeSettings = {
controls: ['date'],
min: new Date(),
startInput: '.md-time-start',
endInput: '.md-time-end',
dateFormat: 'M dd D yy'
};
$scope.selectettings = {};
}]);
<div ng-app="demoApp" ng-controller="demoController" class="md-range-event">
<div mobiscroll-form>
<div class="md-header">
<button mbsc-button id="show" class="mbsc-btn-flat md-cancel-btn">Cancel</button>
<div class="mbsc-header-txt">New event</div>
<button mbsc-button id="show" class="mbsc-btn-flat md-add-btn">Add</button>
</div>
<label>
Title
<input mbsc-input type="text" placeholder="Name of the event"/>
</label>
<label>
Location
<input mbsc-input type="text" placeholder="Where will it be?" />
</label>
<label>
All day
<input mbsc-switch type="checkbox" checked>
</label>
<label>
Starts
<input mbsc-input class="md-time md-time-start" type="text" placeholder="Event start" />
</label>
<label>
Ends
<input mbsc-input class="md-time md-time-end" type="text" placeholder="Event end" />
</label>
<div ng-model="myrange" mobiscroll-range="rangeSettings"> </div>
<label>
Travel Time
<select mbsc-dropdown class="md-time-select">
<option value="none">None</option>
<option value="5">5 minutes</option>
<option value="30">30 minutes</option>
<option value="60">1 hour</option>
<option value="90">1 hour and 30 minutes</option>
<option value="120">2 hours</option>
</select>
</label>
<label>
Show as busy
<input mbsc-segmented type="radio" name="type" checked>
</label>
<label>
Show as free
<input mbsc-segmented type="radio" name="type">
</label>
<label>
Notes
<textarea mbsc-textarea placeholder="Enter notes, URL, comments"></textarea>
</label>
</div>
</div>
.md-range-event .md-header {
position: relative;
background: #4ECCC4;
padding: 1em;
text-align: center;
margin-bottom: 1em;
}
.mbsc-material.md-range-event .md-header,
.md-range-event .mbsc-material .md-header {
background: #009688;
}
.mbsc-android-holo.md-range-event .md-header,
.md-range-event .mbsc-android-holo .md-header {
background: #31c6e7;
}
.mbsc-ios-classic.md-range-event .md-header,
.mbsc-ios.md-range-event .md-header,
.md-range-event .mbsc-ios .md-header {
background: #1272dc;
margin: 0;
z-index: 1;
}
.mbsc-ios-dark.md-range-event .md-header,
.md-range-event .mbsc-ios-dark .md-header {
background: #ff8b0f;
margin: 0;
color: #a1a1a1;
}
.mbsc-wp.md-range-event .md-header,
.md-range-event .mbsc-wp .md-header {
background: #1a9fe0;
}
.md-range-event .md-header .mbsc-header-txt {
display: inline-block;
color: #fff;
font-size: 18px;
}
.md-range-event .md-header .mbsc-btn-flat {
margin: 0;
padding: 0 .5em 0 .5em;
height: 30px;
color: #fff;
text-transform: capitalize;
}
.md-range-event .md-header .md-cancel-btn,
.md-range-event .md-header .md-add-btn {
position: absolute;
top: 50%;
margin-top: -15px;
}
.md-range-event .md-header .mbsc-btn-flat.mbsc-active {
background: rgba(255, 255, 255, 0.2);
}
.md-range-event .md-header .md-add-btn {
right: .75em;
}
.md-range-event .md-header .md-cancel-btn {
left: .75em;
}
Range - Date types
mobiscroll.settings = {
theme: '',
themeVariant: '',
lang: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.isoSettings = {
returnFormat: 'iso8601'
};
$scope.localeSettings = {
returnFormat: 'locale'
};
$scope.momentSettings = {
returnFormat: 'moment'
};
$scope.setDate = function () {
$scope.date = [new Date(1995, 11, 17, 15, 24), new Date(1995, 11, 28, 11, 45)];
}
$scope.setISO = function () {
$scope.iso = ['2008-09-15T15:53:00', '2008-09-23T16:15:00'];
}
$scope.setLocale = function () {
$scope.locale = ['04/25/2010 8:15 AM', '05/04/2010 10:30 AM'];
}
$scope.setMoment = function () {
// make sure that moment js is loaded
$scope.moment = [moment([2018, 3, 18, 15]), moment([2018, 3, 26, 10])];
}
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Working with Js Date Objects</div>
<div class="mbsc-btn-group-block">
<button mbsc-button ng-click="setDate()">Set: Sun Dec 17 1995 03:24:00 GMT - Thu Dec 28 1995 11:45:00 GMT+0200</button>
</div>
<div>
<label>
Date object
<input mbsc-input ng-model="date" mobiscroll-range mobiscroll-instance="dateInst" />
</label>
</div>
</div>
<div class="mbsc-form-group mbsc-padding">
Return value: {{date.toString()}}
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Working with Date strings</div>
<div class="mbsc-btn-group-block">
<button mbsc-button ng-click="setISO()">Set: 2008-09-15T15:53:00 - 2008-09-23T16:15:00</button>
</div>
<div>
<label>
ISO string
<input mbsc-input ng-model="iso" mobiscroll-range="isoSettings"/>
</label>
</div>
</div>
<div class="mbsc-form-group mbsc-padding">
Return value: {{iso.toString()}}
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Working with Localized Strings</div>
<div class="mbsc-btn-group-block">
<button mbsc-button ng-click="setLocale()">Set: 04/25/2010 8:15 AM - 05/04/2010 10:30 AM</button>
</div>
<div>
<label>
Locale format
<input mbsc-input ng-model="locale" mobiscroll-range="localeSettings" />
</label>
</div>
</div>
<div class="mbsc-form-group mbsc-padding">
Return value: {{locale.toString()}}
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Working with Moment JS Objects</div>
<div class="mbsc-btn-group-block">
<button mbsc-button ng-click="setMoment()">Set: 2018-04-18T15:00:00+03:00 - 2018-04-26T10:00:00+03:00</button>
</div>
<div>
<label>
Moment JS
<input mbsc-input ng-model="moment" mobiscroll-range="momentSettings" />
</label>
</div>
</div>
<div class="mbsc-form-group mbsc-padding">
Return value: {{ moment ? (moment[0].format() + ', ' + moment[1].format()) : '' }}
</div>
</div>
</div>
Range - Event handlers
EVENTS FIRED:
angular
.module('demoApp', ['mobiscroll-range'])
.controller('demoController', ['$scope', function ($scope) {
$scope.settings = {
theme: '',
themeVariant: '',
lang: '',
onInit: function (event, inst) {
// Your custom event handler goes here
},
onMarkupReady: function (event, inst) {
// Your custom event handler goes here
},
onBeforeShow: function (event, inst) {
// Your custom event handler goes here
},
onPosition: function (event, inst) {
// Your custom event handler goes here
},
onShow: function (event, inst) {
// Your custom event handler goes here
},
onSet: function (event, inst) {
// Your custom event handler goes here
},
onItemTap: function (event, inst) {
// Your custom event handler goes here
},
onDestroy: function (event, inst) {
// Your custom event handler goes here
},
onClose: function (event, inst) {
// Your custom event handler goes here
},
onChange: function (event, inst) {
// Your custom event handler goes here
},
onCancel: function (event, inst) {
// Your custom event handler goes here
},
onBeforeClose: function (event, inst) {
// Your custom event handler goes here
},
onClear: function (event, inst) {
// Your custom event handler goes here
},
onDayChange: function (event, inst) {
// Your custom event handler goes here
},
onPageChange: function (event, inst) {
// Your custom event handler goes here
},
onPageLoaded: function (event, inst) {
// Your custom event handler goes here
},
onPageLoading: function (event, inst) {
// Your custom event handler goes here
},
onSetDate: function (event, inst) {
// Your custom event handler goes here
},
onTabChange: function (event, inst) {
// Your custom event handler goes here
}
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<input ng-model="mydate" mobiscroll-range="settings" mobiscroll-instance="demo" placeholder="Please Select..." />
</div>
Range - Marked, colored & labels
mobiscroll.settings = {
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date();
$scope.markedSettings = {
display: 'inline',
showSelector: false,
marked: [
{ d: '5/1', color: '#ffc400' },
{ d: '12/24', color: '#ffee00' },
{ d: '12/25', color: 'red' },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 4) },
{ d: new Date(now.getFullYear(), now.getMonth() - 2, 13) },
{ d: new Date(now.getFullYear(), now.getMonth(), 2), color: '#46c4f3' },
{ d: new Date(now.getFullYear(), now.getMonth(), 6), color: '#7e56bd' },
{ d: new Date(now.getFullYear(), now.getMonth(), 11), color: '#7e56bd' },
{ d: new Date(now.getFullYear(), now.getMonth(), 19), color: '#89d7c9' },
{ d: new Date(now.getFullYear(), now.getMonth(), 28), color: '#ea4986' },
{ d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#7e56bd' },
{ d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#f13f77' },
{ d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#89d7c9' },
{ d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#8dec7d' },
{ d: new Date(now.getFullYear(), now.getMonth(), 21), color: '#ffc400' },
{ d: new Date(now.getFullYear(), now.getMonth(), 21), color: '#8dec7d' },
{ start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), color: '#f4511e' }
]
}
$scope.colorSettings = {
display: 'inline',
showSelector: false,
colors: [
{ d: '12/8', background: '#9ccc65' },
{ d: '5/1', background: 'red' },
{ d: '12/24', background: "#fff568" },
{ d: '12/25', background: "#e88080" },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 4), background: '#cfd8dc' },
{ d: new Date(now.getFullYear(), now.getMonth() + 2, 24), background: '#9575cd' },
{ d: new Date(now.getFullYear(), now.getMonth() - 2, 13), background: '#d4e157' },
{ d: new Date(now.getFullYear(), now.getMonth() - 1, 6), background: "#f4511e" },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 6), background: '#46c4f3' },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 22), background: '#7e56bd' },
{ d: new Date(now.getFullYear(), now.getMonth() - 1, 11), background: '#46c4f3' },
{ d: new Date(now.getFullYear(), now.getMonth() - 1, 29), background: '#7e56bd' },
{ d: new Date(now.getFullYear(), now.getMonth(), 2), background: '#46c4f3' },
{ d: new Date(now.getFullYear(), now.getMonth(), 3), background: '#7e56bd' },
{ d: new Date(now.getFullYear(), now.getMonth(), 11), background: '#f13f77' },
{ d: new Date(now.getFullYear(), now.getMonth(), 19), background: '#8dec7d' },
{ d: new Date(now.getFullYear(), now.getMonth(), 28), background: '#ea4986' },
{ start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), text: 'Conference', background: '#f4511e' }
]
}
$scope.labelsSettings = {
display: 'inline',
showSelector: false,
labels: [
{ d: '12/25', text: 'Christmas', color: "#f48fb1" },
{ d: '1/1', text: 'New year' },
{ d: '12/1', text: 'Meeting', color: '#ffc400' },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 4), text: 'Spa day', color: '#cfd8dc' },
{ d: new Date(now.getFullYear(), now.getMonth() + 2, 24), text: 'BD Party', color: '#9ccc65' },
{ d: new Date(now.getFullYear(), now.getMonth() - 2, 13), text: 'Exams', color: '#d4e157' },
{ d: new Date(now.getFullYear(), now.getMonth() - 1, 6), text: 'Trip', color: "#f4511e" },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 6), color: '#46c4f3', text: 'Pizza Night' },
{ d: new Date(now.getFullYear(), now.getMonth() + 1, 22), color: '#7e56bd', text: 'Beerpong' },
{ d: new Date(now.getFullYear(), now.getMonth() - 1, 11), color: '#46c4f3', text: 'Anniversary' },
{ d: new Date(now.getFullYear(), now.getMonth() - 1, 29), color: '#7e56bd', text: 'Pete BD' },
{ d: new Date(now.getFullYear(), now.getMonth(), 2), color: '#46c4f3', text: 'Ana BD' },
{ d: new Date(now.getFullYear(), now.getMonth(), 3), color: '#7e56bd', text: 'Concert' },
{ d: new Date(now.getFullYear(), now.getMonth(), 11), color: '#f13f77', text: 'Trip' },
{ d: new Date(now.getFullYear(), now.getMonth(), 19), color: '#8dec7d', text: 'Math exam' },
{ d: new Date(now.getFullYear(), now.getMonth(), 28), color: '#ea4986', text: 'Party' },
{ start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), text: 'Conference', color: '#f4511e' }
]
}
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form="formSettings">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Marked days</div>
<div ng-model="marked" mobiscroll-range="markedSettings"></div>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Colored days</div>
<div ng-model="color" mobiscroll-range="colorSettings"></div>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Labels</div>
<div ng-model="label" mobiscroll-range="labelsSettings"></div>
</div>
</div>
</div>
Range - Display modes
mobiscroll.settings = {
lang: '',
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.formSettings = {
theme: '',
themeVariant: ''
};
$scope.settings = {
display: 'bottom'
};
$scope.topSettings = {
display: 'top'
};
$scope.centerSettings = {
display: 'center'
};
$scope.bubbleSettings = {
display: 'bubble'
};
$scope.inlineSettings = {
display: 'inline',
layout: 'liquid'
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form="formSettings">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Try different display modes</div>
<label>
Bottom
<input mbsc-input id="demo" ng-model="myRange" mobiscroll-range="settings" placeholder="Please Select..." />
</label>
<label>
Top
<input mbsc-input id="demo-top" ng-model="myRangeTop" mobiscroll-range="topSettings" type="text" placeholder="Please Select..." />
</label>
<label>
Center
<input mbsc-input id="demo-center" ng-model="myRangeCenter" mobiscroll-range="centerSettings" type="text" placeholder="Please Select..." />
</label>
<label>
Bubble
<input mbsc-input id="demo-bubble" ng-model="myRangeBubble" mobiscroll-range="bubbleSettings" type="text" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group mbsc-padding">
<p class="mbsc-thin">With inline display you can embed the Range component in almost any markup or form.</p>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Embedded range picker</div>
<div id="demo-inline" ng-model="myRangeInline" mobiscroll-range="inlineSettings"></div>
</div>
</div>
</div>
Range - Weeks
mobiscroll.settings = {
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date();
$scope.settingsOneWeek = {
display: 'inline',
weeks: 1,
showSelector: false
}
$scope.settingsTwoWeek = {
display: 'inline',
weeks: 2,
showSelector: false
}
$scope.settingsThreeWeek = {
display: 'inline',
weeks: 3,
showSelector: false
}
$scope.rangeOneWeek = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate() + 2)];
$scope.rangeTwoWeek = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate() + 7)];
$scope.rangeThreeWeek = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate() + 11)];
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form="formSettings">
<div mbsc-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title"> One week view</div>
<div ng-model="rangeOneWeek" mobiscroll-range="settingsOneWeek"></div>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title"> Two week view</div>
<div ng-model="rangeTwoWeek" mobiscroll-range="settingsTwoWeek"></div>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title"> Three week view</div>
<div ng-model="rangeThreeWeek" mobiscroll-range="settingsThreeWeek"></div>
</div>
</div>
</div>
</div>
Range - Multi month view
mobiscroll.settings = {
lang: '',
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.twoBubbleSettings = {
display: 'bubble',
months: 2,
yearChange: false
};
$scope.threeBubbleSettings = {
display: 'bubble',
months: 3,
yearChange: false
};
$scope.fourBubbleSettings = {
display: 'bubble',
months: 4,
yearChange: false
};
$scope.bubbleSettings = {
display: 'bubble',
months: 'auto',
yearChange: false
};
$scope.twoSettings = {
display: 'center',
months: 2,
yearChange: false
};
$scope.threeSettings = {
display: 'center',
months: 3,
yearChange: false
};
$scope.fourSettings = {
display: 'center',
months: 4,
yearChange: false
};
$scope.settings = {
display: 'center',
months: 'auto',
yearChange: false
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Popover range</div>
<label>
Two months
<input mbsc-input ng-model="twoBubbleRange" mobiscroll-range="twoBubbleSettings" placeholder="Please Select..." />
</label>
<label>
Three months
<input mbsc-input ng-model="threeBubbleRange" mobiscroll-range="threeBubbleSettings" placeholder="Please Select..." />
</label>
<label>
Four months
<input mbsc-input ng-model="fourBubbleRange" mobiscroll-range="fourBubbleSettings" placeholder="Please Select..." />
</label>
<label>
Auto
<input mbsc-input ng-model="bubbleRange" mobiscroll-range="bubbleSettings" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Center positioned range</div>
<label>
Two months
<input mbsc-input ng-model="twoRange" mobiscroll-range="twoSettings" placeholder="Please Select..." />
</label>
<label>
Three months
<input mbsc-input ng-model="threeRange" mobiscroll-range="threeSettings" placeholder="Please Select..." />
</label>
<label>
Four months
<input mbsc-input ng-model="fourRange" mobiscroll-range="fourSettings" placeholder="Please Select..." />
</label>
<label>
Auto
<input mbsc-input ng-model="range" mobiscroll-range="settings" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
Range - Calendar systems
mobiscroll.settings = {
lang: '',
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
var now = new Date(),
week = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6, 23, 59)];
$scope.gregorian = week;
$scope.jalali = week;
$scope.hijri = week;
$scope.gregorianSettings = {
display: 'inline',
calendarSystem: 'gregorian'
};
$scope.jalaliSettings = {
display: 'inline',
calendarSystem: 'jalali',
lang: 'fa'
};
$scope.hijriSettings = {
display: 'inline',
calendarSystem: 'hijri',
lang: 'ar'
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-sm-12 mbsc-col-md-4">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Gregorian calendar</div>
<div ng-model="gregorian" mobiscroll-range="gregorianSettings"></div>
</div>
</div>
<div class="mbsc-col-sm-12 mbsc-col-md-4">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Jalali calendar</div>
<div ng-model="jalali" mobiscroll-range="jalaliSettings"></div>
</div>
</div>
<div class="mbsc-col-sm-12 mbsc-col-md-4">
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Hijri calendar</div>
<div ng-model="hijri" mobiscroll-range="hijriSettings"></div>
</div>
</div>
</div>
</div>
</div>
</div>
Range - Desktop
mobiscroll.settings = {
lang: '',
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.topSettings = {
display: 'top',
touchUi: false
};
$scope.bottomSettings = {
display: 'bottom',
touchUi: false
};
$scope.settings = {
touchUi: false
};
$scope.centerSettings = {
display: 'center',
touchUi: false
};
$scope.datetimeSettings = {
touchUi: false,
controls: ['date', 'time'],
dateWheels: '|D M d|',
cssClass: 'scroller-range'
};
$scope.dateSettings = {
touchUi: false,
controls: ['date']
};
$scope.timeSettings = {
touchUi: false,
controls: ['time']
};
$scope.setBtnSettings = {
display: 'center',
touchUi: false,
buttons: ['set']
};
$scope.setCancelSettings = {
display: 'center',
touchUi: false,
buttons: ['set', 'cancel']
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-center">
<div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Pop-up positioning</div>
<label>
Top
<input mbsc-input ng-model="top" mobiscroll-range="topSettings" placeholder="Please select...">
</label>
<label>
Bottom
<input mbsc-input ng-model="bottom" mobiscroll-range="bottomSettings" placeholder="Please select...">
</label>
<label>
Anchored
<input mbsc-input ng-model="anchored" mobiscroll-range="settings" placeholder="Please select...">
</label>
<label>
Center
<input mbsc-input ng-model="center" mobiscroll-range="centerSettings" placeholder="Please select...">
</label>
</div>
</div>
</div>
<div class="mbsc-row mbsc-justify-content-center">
<div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Scroller components</div>
<label>
Date & Time
<input mbsc-input ng-model="datetime" mobiscroll-range="datetimeSettings" placeholder="Please select...">
</label>
<label>
Date
<input mbsc-input ng-model="date" mobiscroll-range="dateSettings" placeholder="Please select...">
</label>
<label>
Time
<input mbsc-input ng-model="time" mobiscroll-range="timeSettings" placeholder="Please select...">
</label>
</div>
</div>
</div>
<div class="mbsc-row mbsc-justify-content-center">
<div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">With buttons</div>
<label>
Set button
<input mbsc-input ng-model="setBtn" mobiscroll-range="setBtnSettings" placeholder="Please select...">
</label>
<label>
Set/Cancel
<input mbsc-input ng-model="setCancel" mobiscroll-range="setCancelSettings" placeholder="Please select...">
</label>
</div>
</div>
</div>
</div>
</div>
</div>
.scroller-range .mbsc-cal-tabs {
display: none;
}
Range - Theming capabilities
The look and feel of the range can be deeply customized. There are four levels of customization:
- Base themes: Choose between
Mobiscroll
,iOS
,Android Material
andWindows
. - Light or dark: Every theme has a
light
anddark
variant. Setting thethemeVariant
to'auto'
will switch based on system settings. - Custom themes: Use the theme builder to customize the colors and make it match your brand.
- Custom CSS: If you need further customization, the sky is the limit with CSS overrides.
You can also see how every example looks by changing the theme in the floating action bar on the right side.
mobiscroll.settings = {
lang: '',
theme: '',
themeVariant: ''
};
angular
.module('demoApp', ['mobiscroll-range', 'mobiscroll-form'])
.controller('demoController', ['$scope', function ($scope) {
$scope.iosSettings = {
theme: 'ios',
themeVariant: 'light',
display: 'bubble',
touchUi: false
};
$scope.iosDarkSettings = {
theme: 'ios',
themeVariant: 'dark',
display: 'bubble',
touchUi: false
};
$scope.iosCustomSettings = {
theme: 'ios-gray',
display: 'bubble',
touchUi: false
};
$scope.materialSettings = {
theme: 'material',
themeVariant: 'light',
display: 'bubble',
touchUi: false
};
$scope.materialDarkSettings = {
theme: 'material',
themeVariant: 'dark',
display: 'bubble',
touchUi: false
};
$scope.materialCustomSettings = {
theme: 'material-indigo',
display: 'bubble',
touchUi: false
};
$scope.windowsSettings = {
theme: 'windows',
themeVariant: 'light',
display: 'bubble',
touchUi: false
};
$scope.windowsDarkSettings = {
theme: 'windows',
themeVariant: 'dark',
display: 'bubble',
touchUi: false
};
$scope.windowsCustomSettings = {
theme: 'windows-yellow',
display: 'bubble',
touchUi: false
};
$scope.mobiscrollSettings = {
theme: 'mobiscroll',
themeVariant: 'light',
display: 'bubble',
touchUi: false
};
$scope.mobiscrollDarkSettings = {
theme: 'mobiscroll',
themeVariant: 'dark',
display: 'bubble',
touchUi: false
};
$scope.mobiscrollCustomSettings = {
theme: 'mobiscroll-lime',
display: 'bubble',
touchUi: false
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div mobiscroll-form>
<div class="mbsc-grid mbsc-grid-fixed">
<div class="mbsc-row">
<div class="mbsc-col-sm-12 mbsc-col-md-6">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">iOS Theme</div>
<label>
Light
<input mbsc-input ng-model="iosDemo" mobiscroll-range="iosSettings" placeholder="Please Select..." />
</label>
<label>
Dark
<input mbsc-input ng-model="iosDarkDemo" mobiscroll-range="iosDarkSettings" placeholder="Please Select..." />
</label>
<label>
Custom
<input mbsc-input ng-model="iosCustomkDemo" mobiscroll-range="iosCustomSettings" placeholder="Please Select..." />
</label>
</div>
</div>
<div class="mbsc-col-sm-12 mbsc-col-md-6">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Material Theme</div>
<label>
Light
<input mbsc-input ng-model="materialDemo" mobiscroll-range="materialSettings" placeholder="Please Select..." />
</label>
<label>
Dark
<input mbsc-input ng-model="materialDarkDemo" mobiscroll-range="materialDarkSettings" placeholder="Please Select..." />
</label>
<label>
Custom
<input mbsc-input ng-model="materialCustomDemo" mobiscroll-range="materialCustomSettings" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-sm-12 mbsc-col-md-6">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Windows Theme</div>
<label>
Light
<input mbsc-input ng-model="windowsDemo" mobiscroll-range="windowsSettings" placeholder="Please Select..." />
</label>
<label>
Dark
<input mbsc-input ng-model="windowsDarkDemo" mobiscroll-range="windowsDarkSettings" placeholder="Please Select..." />
</label>
<label>
Custom
<input mbsc-input ng-model="windowsCustomkDemo" mobiscroll-range="windowsCustomSettings" placeholder="Please Select..." />
</label>
</div>
</div>
<div class="mbsc-col-sm-12 mbsc-col-md-6">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Mobiscroll Theme</div>
<label>
Light
<input mbsc-input ng-model="mobiscrollDemo" mobiscroll-range="mobiscrollSettings" placeholder="Please Select..." />
</label>
<label>
Dark
<input mbsc-input ng-model="mobiscrollDarkDemo" mobiscroll-range="mobiscrollDarkSettings" placeholder="Please Select..." />
</label>
<label>
Custom
<input mbsc-input ng-model="mobiscrollCustomDemo" mobiscroll-range="mobiscrollCustomSettings" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
</div>
</div>
Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.
Component license
Purchase component licenses if you are looking for specific funcionality.
All
Framework license
Get all 36 components, including
Framework license
Get all 36 components, including
- Use it when building with plain and simple JS
- Compatible with vanilla JS app or frameworks like Vue
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with jQuery and jQuery Mobile
- Enjoy the familiar API if you already use jQuery
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular JS and Ionic 1
- For web and mobile apps based on Angular 1.x
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular and Ionic 2/3/4
- Visual Studio and VS Code integration
- Royalty-free commercial usage
- Technical support is included with the license
- Use it when building with React JS
- Collection of UI components for web and mobile
- Royalty-free commercial usage
- Technical support is included with the license
Framework license
Select the development framework you are using. Get all 36 components with the license.
- Use it when building with plain and simple JS
- Compatible with vanilla JS app or frameworks like Vue
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with jQuery and jQuery Mobile
- Enjoy the familiar API if you already use jQuery
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular JS and Ionic 1
- For web and mobile apps based on Angular 1.x
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular and Ionic 2/3/4
- Visual Studio and VS Code integration
- Royalty-free commercial usage
- Technical support is included with the license
- Use it when building with React JS
- Collection of UI components for web and mobile
- Royalty-free commercial usage
- Technical support is included with the license
Select the framework you are interested in
Use Javascript when building with plain and simple JS.
Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.
Use AngularJS when building with Angular 1.x or Ionic 1.
Use Angular when building with Angular 2/4/5/6/7/8 or Ionic 2/3/4.
Use it when you are building your app or website with React.
Do you need additional support seats?
The license comes with one support seat. ( +$100/seat )
Add the source code?
What framework are you using?
We have to set you up with a trial for this to run 👍
Step 1.Install the Mobiscroll CLI from npm
$ npm install -g @mobiscroll/cli
The CLI makes configuring your apps super simple 👍
Step 2.Run the following command in the root folder of your Ionic project
$ mobiscroll config ionic
$ mobiscroll config ionic --lite
You will be prompted to log in with your mobiscroll account. Set your password here
Create an Ionic 3 & Mobiscroll starter with the CLI:
Run this command for Ionic 4 & Mobiscroll starter:
Step 3.Copy the code into your app.
Step 4.Run ionic serve in the root folder of your app 🎉
$ ionic serve
And voilà, everything should be running smoothly.
Step 1.Install the Mobiscroll CLI from npm
$ npm install -g @mobiscroll/cli
The CLI makes configuring your apps super simple 👍
Step 2.Run the following command in the root folder of your Angular project
$ mobiscroll config angular
$ mobiscroll config angular --lite
You will be prompted to log in with your mobiscroll account. Set your password here
Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.
Step 4.Run ng serve in the root folder of your app 🎉
$ ng serve
And voilà, everything should be running smoothly.
Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.
$ npm install
$ ionic serve
Let us know if we can help and enjoy!
Your password has been changed!
Everything is set up so that you can dig in right away and start exploring.
We have set up a trial so that you can try the demos locally.
Extract the zip file and open the demo in your favorite browser.
To install Mobiscroll in your project
follow instructions from this page.
Let us know if we can help and enjoy! 👍
Please extract the zip file and run the project like any Angular CLI app.
Make sure to have the Angular CLI installed.
For installation and usage, extract the zip file and open a terminal window and follow these steps.
$ npm install
$ ng serve --open
Let us know if we can help and enjoy! 👍
Everything is set up so that you can dig in right away and start exploring.
We have set up a trial so that you can try the demos locally.
The easiest way to get started is to follow the installation steps and by
grabbing the code directly from the demo page. Let us know if we can help and enjoy!
You'll find a fully functional Kitchen-sink Ionic app in the zip file.
Everything is set up so that you can dig in right away and start exploring.
We have set up a trial so that you can try the demos locally.
The demos are using Babel's in-browser ES6 and JSX transformer.
Extract the zip file and open the demo in your browser. To install Mobiscroll in your project
follow instructions from this page.
Let us know if we can help and enjoy! 👍