Angular JS Date & Time Date & Time for Angular JS and Ionic 1

Date & Time for Angular JS and Ionic 1

Learn more

Date & time scroller component for date, time selection or a combination of both.

Compatible with mobiscroll forms, custom inputs and more. Use it on any touch screen, no matter if small or large.

Shipping with useful features for a refined UX, including:

  • Usage on mobile and tablet
  • Date-only, time-only or mixed modes
  • Steps for display values
  • Hide wheels that are not needed
  • Validation with disabled dates, min & max for restricting selection
  • Circular wheels
  • Multiple theme support
  • Modal, popup and inline display mores
  • RTL Support
  • Full localization


Interested in date and/or time selection? Other demos that could be useful:

Calendar Range Timespan


Date & Time demos available for other frameworks.

Viewing demos & code for

light
dark

Change the theme setting here

Date & Time - Mobile & Desktop usage

Change demo
Mobile & Desktop usage

Use it for mobile, desktop and everything in between by setting it up responsively (view responsive demo). The component can be rendered for touch UI - great for smartphones and tablets - and for non-touch UI screens like laptop and desktops. The main difference is that they are optimized for either touch or pointer interaction.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.mobileSettings = {
            display: 'bubble'
        };

        $scope.desktopSettings = {
            display: 'bubble',
            touchUi: false
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-6">
                    <label>
                    Mobile
                    <input mbsc-input ng-model="mobile" mobiscroll-date="mobileSettings" data-input-style="box" placeholder="Please Select..." />
                </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-6">
                    <label>
                    Desktop
                    <input mbsc-input ng-model="desktop" mobiscroll-date="desktopSettings" data-input-style="box" placeholder="Please Select..." />
                </label>
                </div>
            </div>
        </div>
    </div>
</div>

Date & Time - App & Website usage

Change demo
App & Website usage

Use it on any custom input or with Mobiscroll form fields. The component is triggered on input focus, but is can also be triggered on a button click.

Let’s say you already have a form and you want to enhance the date picking experience. No problem, the date & time can be used on your existing fields. Most of our examples are presented using Mobiscroll form fields, but you get the picture.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.external = new Date();

        $scope.externalSettings = {
            showOnTap: false,
            showOnFocus: false
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form class="mbsc-form-box">
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Using the Data & Time with Mobiscroll form fields</div>
                <div class="mbsc-row">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Date
                            <input mbsc-input data-input-style="box" ng-model="date" mobiscroll-date data-input-style="box" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Time
                            <input mbsc-input data-input-style="box" ng-model="time" mobiscroll-time data-input-style="box" placeholder="Please Select..." />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-non-form">Date</label>
                <input id="demo-non-form" ng-model="nonform" mobiscroll-date class="demo-non-form" placeholder="Please Select..." />
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <div class="mbsc-row mbsc-align-items-end">
                    <div class="mbsc-col-9">
                        <label for="demo-app-date-external">Show on button click only</label>
                        <input id="demo-app-date-external" ng-model="external" mobiscroll-date="externalSettings" mobiscroll-instance="demoExternal" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button ng-click="demoExternal.show()" class="external-button">Show</button>
                    </div>
                </div>
            </div>
        </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;
}

.external-container button.external-button {
    font-weight: 400;
    padding: 10px;
    margin: 6px 0 13px 0;
    width: 100%;
}

Date & Time - Date object, ISO 8601 & moment.js

Change demo
Date object, ISO 8601 & moment.js

The date & time picker supports multiple data types. You can work with JS date objects - new Date(1995, 11, 17, 15, 24), ISO date strings - '2008-09-15T15:53:00', localized date strings - '04/25/2010 8:15 AM' and moment.js objects - moment([2018, 3, 27, 12, 15]).

mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    lang: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.dateSettings = {
            dateWheels: '|D M d|'
        };

        $scope.isoSettings = {
            dateWheels: '|D M d|',
            returnFormat: 'iso8601'
        };

        $scope.localeSettings = {
            dateWheels: '|D M d|',
            returnFormat: 'locale'
        };

        $scope.momentSettings = {
            dateWheels: '|D M d|',
            returnFormat: 'moment'
        };


        $scope.setDate = function () {
            $scope.date = new Date(1995, 11, 17, 15, 24);
        };

        $scope.setISO = function () {
            $scope.iso = '2008-09-15T15:53:00';
        };

        $scope.setLocale = function () {
            $scope.locale = '04/25/2010 8:15 AM';
        };

        $scope.setMoment = function () {
            // make sure that moment js is loaded
            $scope.moment = moment([2018, 3, 27, 12, 15]);
        };

    }]);
<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()" class="mbsc-btn-primary">Set: Sun Dec 17 1995 03:24:00 GMT</button>
            </div>
            <div>
                <label>
                    Date object
                    <input mbsc-input ng-model="date" mobiscroll-datetime="dateSettings" />
                </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()" class="mbsc-btn-primary">Set: 2008-09-15T15:53:00</button>
            </div>
            <div>
                <label>
                    ISO string
                    <input mbsc-input ng-model="iso" mobiscroll-datetime="isoSettings" />
                </label>
            </div>
        </div>
        <div class="mbsc-form-group mbsc-padding">
            Return value: {{iso}}
        </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()" class="mbsc-btn-primary">Set: 04/25/2010 8:15 AM</button>
            </div>
            <div>
                <label>
                    Locale format
                    <input mbsc-input ng-model="locale" mobiscroll-datetime="localeSettings" />
                </label>
            </div>
        </div>
        <div class="mbsc-form-group mbsc-padding">
            Return value: {{locale}}
        </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()" class="mbsc-btn-primary">Set: 2018-04-27T12:15:00+03:00</button>
            </div>
            <div>
                <label>
                    Moment JS
                    <input mbsc-input ng-model="moment" mobiscroll-datetime="momentSettings" />
                </label>
            </div>
        </div>
        <div class="mbsc-form-group mbsc-padding">
            Return value: {{moment.format()}}
        </div>
    </div>
</div>

Date & Time - Mobile display modes

Change demo
Mobile display modes

Depending on your requirements you can use different display modes for both mobile and desktop. On mobile the component can be rendered either at the top or bottom of the screen, in the center of the screen, anchored to an input or any object for that matter and it can also be embedded in any inline content.

Interested in desktop usage?  Check out the next example →
mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $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>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Display modes</div>
            <label>
                Bottom
                <input mbsc-input ng-model="myDate" mobiscroll-date="settings" placeholder="Please Select..." />
            </label>
            <label>
                Top
                <input mbsc-input ng-model="myDateTop" mobiscroll-date="topSettings" type="text" placeholder="Please Select..." />
            </label>
            <label>
                Center
                <input mbsc-input ng-model="myDateCenter" mobiscroll-date="centerSettings" type="text" placeholder="Please Select..." />
            </label>
            <label>
                Bubble
                <input mbsc-input ng-model="myDateBubble" mobiscroll-date="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 Date & Time component in almost any markup or form.</p>
        </div>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Embedded date picker</div>
            <div ng-model="myDateInline" mobiscroll-date="inlineSettings"></div>
        </div>
    </div>
</div>

Date & Time - Desktop display modes

Change demo
Desktop display modes

Use the available display modes on mobile and desktop. On larger screens you have slightly different rendering options suitable for the large form-factor and pointer interaction. Use the top, bottom and center modes for getting it in front of the users or stay in context and anchor it to the input.

Interested in mobile usage?  Check out the previous example →
mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', '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
        };

        $scope.dateSettings = {
            touchUi: false
        };

        $scope.timeSettings = {
            touchUi: false
        };

        $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-date="topSettings" placeholder="Please select...">
                        </label>
                        <label>
                            Bottom
                            <input mbsc-input ng-model="bottom" mobiscroll-date="bottomSettings" placeholder="Please select...">
                        </label>
                        <label>
                            Anchored
                            <input mbsc-input ng-model="anchored" mobiscroll-date="settings" placeholder="Please select...">
                        </label>
                        <label>
                            Center
                            <input mbsc-input ng-model="center" mobiscroll-date="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">Basic usage</div>
                        <label>
                            Date & Time
                            <input mbsc-input ng-model="datetime" mobiscroll-datetime="datetimeSettings" placeholder="Please select...">
                        </label>
                        <label>
                            Date
                            <input mbsc-input ng-model="date" mobiscroll-date="dateSettings" placeholder="Please select...">
                        </label>
                        <label>
                            Time
                            <input mbsc-input ng-model="time" mobiscroll-time="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-datetime="setBtnSettings" placeholder="Please select...">
                        </label>
                        <label>
                            Set/Cancel
                            <input mbsc-input ng-model="setCancel" mobiscroll-datetime="setCancelSettings" placeholder="Please select...">
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Date & Time - Responsive behavior

Change demo
Responsive behavior

Configure the date & time to behave and render differently on different sized screens. You can have a bottom positioned date scroller on mobile, a popover anchored to the input on tablet and desktop display on large sceens.

All this can be configured under the responsive setting. Think of it as configuring how the settings change based on the screen-size.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.dateTimeSetting = {
            responsive: {
                xsmall: {
                    dateWheels: '|D M d|'
                },
                small: {
                    dateWheels: '|D M d|',
                    display: 'bubble'
                },
                medium: {
                    touchUi: false
                }
            }
        };

        $scope.dateSetting = {
            headerText: '{value}',
            responsive: {
                small: {
                    display: 'bubble'
                },
                medium: {
                    headerText: false,
                    touchUi: false
                }
            }
        };

        $scope.timeSetting = {
            responsive: {
                small: {
                    display: 'bubble'
                },
                medium: {
                    touchUi: false
                }
            }
        };

    }]);
<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">Basic usage</div>
                        <label>
                            Date & Time
                            <input mbsc-input ng-model="datetime" mobiscroll-datetime="dateTimeSetting" placeholder="Please Select..." />
                        </label>
                        <label>
                            Date
                            <input mbsc-input ng-model="date" mobiscroll-date="dateSetting"  placeholder="Please Select..." />
                        </label>
                        <label>
                            Time
                            <input mbsc-input ng-model="time" mobiscroll-time="timeSetting" placeholder="Please Select..." />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Date & Time - Date picker

Change demo
Date picker

Use the component for date selection and only show the day, month and year wheels. Use the dateFormat and dateWheel settings to customize the experience. Check out some great examples for custom formats and for hiding the day resulting in a month/year picker.

Use the same component but different configuration for time and date-time selection.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        var now = new Date();

        $scope.mobile = now;
        $scope.desktop = now;
        $scope.header = now;
        $scope.nonform = now;
        $scope.external = now;

        $scope.desktopSettings = {
            touchUi: false
        };

        $scope.headerSettings = {
            headerText: '{value}'
        };

        $scope.externalSettings = {
            showOnTap: false,
            showOnFocus: false
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Mobile
                        <input mbsc-input ng-model="mobile" mobiscroll-date data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Desktop
                        <input mbsc-input ng-model="desktop" mobiscroll-date="desktopSettings" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Header text
                        <input mbsc-input ng-model="header" mobiscroll-date="headerSettings" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-non-form">Date</label>
                <input id="demo-non-form" ng-model="nonform" mobiscroll-date class="demo-non-form" />
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <div class="mbsc-row mbsc-align-items-end">
                    <div class="mbsc-col-9">
                        <label for="demo-app-date-external">Show on button click only</label>
                        <input id="demo-app-date-external" ng-model="external" mobiscroll-date="externalSettings" mobiscroll-instance="demoExternal" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button ng-click="demoExternal.show()" class="external-button">Show</button>
                    </div>
                </div>
            </div>
        </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;
}

.external-container button.external-button {
    font-weight: 400;
    padding: 10px;
    margin: 6px 0 13px 0;
    width: 100%;
}

Once we started using Mobiscroll, our conversions have improved and the experience became much more delightful!

Daniel Maldonado, Sr. Web Designer, Ecommission Financial Services

Date & Time - Time-only picker

Change demo
Time-only picker

Use the component for time selection with wheels for hours, minutes and seconds. Control the format - timeFormat and wheels - timeWheels and switch between AM/PM or 24h formats. Check out some great examples for custom formats.

Use the same component but different configuration for date and date-time selection.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        var now = new Date();

        $scope.mobile = now;
        $scope.desktop = now;
        $scope.h12 = now;
        $scope.h24 = now;
        $scope.hms = now;
        $scope.nonform = now;
        $scope.external = now;

        $scope.desktopSettings = {
            touchUi: false
        };

        $scope.h12Settings = {
            timeFormat: 'hh:ii A'
        };

        $scope.h24Settings = {
            timeFormat: 'HH:ii'
        };

        $scope.hmsSettings = {
            timeFormat: 'HH:ii:ss',
            headerText: 'Time: {value}'
        };

        $scope.externalSettings = {
            showOnTap: false,
            showOnFocus: false
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form class="mbsc-form-box">
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Use it on mobile and desktop</div>
                <div class="mbsc-row">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Mobile
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="mobile" mobiscroll-time />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Desktop
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="desktop" mobiscroll-time="desktopSettings" />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Time picker with different time formats</div>
                <div class="mbsc-row">
                    <div class="mbsc-col-sm-12 mbsc-col-md-4">
                        <label>
                            12 h
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="h12" mobiscroll-time="h12Settings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-4">
                        <label>
                            24 h
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="h24" mobiscroll-time="h24Settings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-4">
                        <label>
                            Hour, Min, Sec
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="hms" mobiscroll-time="hmsSettings" />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-time-non-form">Time</label>
                <input id="demo-time-non-form" ng-model="nonform" mobiscroll-time class="demo-non-form" />
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <div class="mbsc-row mbsc-align-items-end">
                    <div class="mbsc-col-9">
                        <label for="demo-time-external">Show on button click only</label>
                        <input id="demo-time-external" ng-model="external" mobiscroll-time="externalSettings" mobiscroll-instance="demoExternal" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button ng-click="demoExternal.show()" class="external-button">Show</button>
                    </div>
                </div>
            </div>
        </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;
}

.external-container button.external-button {
    font-weight: 400;
    padding: 10px;
    margin: 6px 0 13px 0;
    width: 100%;
}

Date & Time - Date & time picker

Change demo
Date & time picker

Use the component for a combined date & time picker. Select a day, month, year along with hour and minutes on separate wheels or have the date on a single wheel and the time on separate wheels.

Show the date and time in localized formats or customize it to your needs. Take a look at some of the formatting options available.

Besides the combined view you can use it as a date-only and time-only picker.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        var now = new Date();

        $scope.compact = now;
        $scope.expanded = now;
        $scope.date = now;
        $scope.time = now;
        $scope.nonform = now;
        $scope.external = now;

        $scope.compactSettings = {
            dateWheels: '|D M d|'
        };

        $scope.externalSettings = {
            showOnTap: false,
            showOnFocus: false
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form class="mbsc-form-box">
        <div class="mbsc-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-7">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Date and time in the same field</div>
                        <div class="mbsc-row mbsc-form-grid">
                            <div class="mbsc-col-sm-12 mbsc-col-lg-6">
                                <label>
                                    Compact
                                    <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="compact" mobiscroll-datetime="compactSettings" />
                                </label>
                            </div>
                            <div class="mbsc-col-sm-12 mbsc-col-lg-6">
                                <label>
                                    Expanded
                                    <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="expanded" mobiscroll-datetime />
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-5">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Date and time separately</div>
                        <div class="mbsc-row mbsc-form-grid">
                            <div class="mbsc-col-sm-12 mbsc-col-lg-6">
                                <label>
                                    Date
                                    <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="date" mobiscroll-date />
                                </label>
                            </div>
                            <div class="mbsc-col-sm-12 mbsc-col-lg-6">
                                <label>
                                    Time
                                    <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="time" mobiscroll-time />
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-non-form">Date</label>
                <input id="demo-non-form" ng-model="nonform" mobiscroll-datetime class="demo-non-form" />
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <div class="mbsc-row mbsc-align-items-end">
                    <div class="mbsc-col-9">
                        <label for="demo-app-date-external">Show on button click only</label>
                        <input id="demo-app-date-external" ng-model="external" mobiscroll-datetime="externalSettings" mobiscroll-instance="demoExternal" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button ng-click="demoExternal.show()" class="external-button">Show</button>
                    </div>
                </div>
            </div>
        </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;
}

.external-container button.external-button {
    font-weight: 400;
    padding: 10px;
    margin: 6px 0 13px 0;
    width: 100%;
}

Date & Time - Month and year picker

Change demo
Month and year picker

Customize the wheels and format the date picker for month & year. Choose a month/year format for credit card expiration date.

This and even more can be done with the dateWheels setting.

Interested in changing the date format?  Explore formatting options →
mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    lang: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        var now = new Date(),
            until = new Date(now.getFullYear() + 10, now.getMonth());

        $scope.exp = new Date("2020-12");

        $scope.settings = {
            dateWheels: 'mm - MM  yy',
            dateFormat: 'mm/yy',
            min: now,
            max: until,
            minWidth: 100
        }
    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Add a new credit card</div>
            <label>
                Name
                <input mbsc-input type="text" placeholder="Required" />
            </label>
            <label>
                Card
                <input mbsc-input type="text" placeholder="Credit card number" />
            </label>
            <label>
                Expiration
                 <input mbsc-input ng-model="exp" mobiscroll-date="settings" mobiscroll-instance="demo" placeholder="Required" />
            </label>
            <label>
                Security
                <input mbsc-input type="text" placeholder="3-digit CVV" />
            </label>
        </div>
    </div>
</div>

Date & Time - Min & max values

Change demo
Min & max values

Use the min and max settings to restrict selection. This is useful to make the selection faster and to reduce user errors. A great example is date of birth. You want to disable future dates and maybe add age verification? Simply restrict values up to 18 years in the past.

Looking for a more sophisticated way for disabling dates?  See how to disable dates and times →
mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {
        var now = new Date(),
            minDate = new Date(now.getFullYear() - 100, 0, 1),
            maxDate = new Date(now.getFullYear() + 30, 11, 31),
            minTime = new Date(new Date().setHours(10, 30)),
            maxTime = new Date(new Date().setHours(18, 59)),
            bday = new Date(now.getFullYear() - 18, now.getMonth(), now.getDay());

        $scope.mindate = now;
        $scope.maxdate = now;
        $scope.dob = now;
        $scope.inf = now;
        $scope.mintime = now;
        $scope.maxtime = now;
        $scope.minmax = now;
        $scope.dateStr = now;
        $scope.moment = now;

        $scope.mindateSettings = {
            min: minDate
        };

        $scope.maxdateSettings = {
            max: maxDate
        };

        $scope.dobSettings = {
            max: bday
        };

        $scope.mintimeSettings = {
            min: minTime
        };

        $scope.maxtimeSettings = {
            max: maxTime
        };

        $scope.minmaxSettings = {
            min: minTime,
            max: maxTime
        };

        $scope.dateStrSettings = {
            max: '2018-08-31T00:00',
            min: '07/01/2018'
        };

        $scope.momentSettings = {
            max: moment([2018, 8, 30]),
            min: moment([2018, 7, 1])
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form class="mbsc-form-box">
        <div class="mbsc-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Restricting the date picker</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Min date
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="mindate" mobiscroll-date="mindateSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Max date
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="maxdate" mobiscroll-date="maxdateSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Date of birth
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="dob" mobiscroll-date="dobSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Infinite
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="inf" mobiscroll-date />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Restricting the time picker</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-4">
                        <label>
                            Min time
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="mintime" mobiscroll-time="mintimeSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-4">
                        <label>
                            Max time
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="maxtime" mobiscroll-time="maxtimeSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-4">
                        <label>
                            Min & max
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="minmax" mobiscroll-time="minmaxSettings" />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Date formats</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            String
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="dateStr" mobiscroll-date="dateStrSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Moment JS
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="moment" mobiscroll-date="momentSettings" />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Date & Time - Setting invalids

Change demo
Setting invalids

Disable dates with the invalid setting. It supports exact dates, ranges, recurring dates and weekdays. Time can also be invalidated by passing exact values and ranges.

Using invalids is essential to a great UX. First make sure you have the min & max values right and then work your way back to invalids. If you would like to re-enable dates inside an invalid range, you can do it with the valid setting. Having it set up correctly not just enhances the UX, but improves performance.

mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {
        var now = new Date();

        $scope.date = now;
        $scope.rec = now;
        $scope.week = now;
        $scope.dateRange = now;
        $scope.time = now;
        $scope.timeRange = now;
        $scope.dateVal = new Date(2018, 11, 19);
        $scope.timeVal = new Date(new Date().setHours(12, 30, 0, 0));
        $scope.dateStr = now;
        $scope.moment = now;

        $scope.dateSettings = {
            invalid: [
                new Date(2018, 1, 3),
                new Date(2018, 6, 11)
            ]
        };

        $scope.recSettings = {
            invalid: [
                '1/1',
                '1/2',
                '12/25',
                '12/26',
                '7/10',
                '7/13',
                '9/10',
                '11/10'
            ]
        };

        $scope.weekSettings = {
            invalid: ['w0', 'w2', 'w6']
        };

        $scope.dateRangeSettings = {
            invalid: [
                { start: new Date(2018, 0, 27), end: new Date(2018, 2, 15) }
            ]
        };

        $scope.timeSettings = {
            steps: {
                minute: 30
            },
            invalid: [
                { d: new Date(), start: '13:00', end: '13:00' },
                { d: new Date(), start: '15:00', end: '15:00' },
                { d: new Date(), start: '15:30', end: '15:30' },
                { d: new Date(), start: '16:00', end: '16:00' }
            ]
        };

        $scope.timeRangeSettings = {
            invalid: [
                { start: '12:00', end: '16:00' }
            ]
        };

        $scope.dateValSettings = {
            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 = {
            invalid: [
                { start: '13:00', end: '20:00' }
            ],
            valid: [
                { start: '17:00', end: '17:30' },
                { start: '18:00', end: '18:30' }
            ]
        };

        $scope.dateStrSettings = {
            invalid: [
                '2018-06-15T00:00',
                '2018-06-18T00:00',
                '06/20/2018',
                '06/23/2018'
            ]
        };

        // make sure that moment js is loaded
        $scope.momentSettings = {
            invalid: [
                moment([2018, 5, 15]),
                moment([2018, 5, 18])
            ]
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form class="mbsc-form-box">
        <div class="mbsc-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Invalidating dates</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Exact date
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="date" mobiscroll-date="dateSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Recurring
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="rec" mobiscroll-date="recSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Weekdays
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="week" mobiscroll-date="weekSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Range
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="dateRange" mobiscroll-date="dateRangeSettings" />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Invalidating time</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Exact
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="time" mobiscroll-time="timeSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Range
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="timeRange" mobiscroll-time="timeRangeSettings" />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Overriding inside invalid ranges</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            12/20/2018 - 12/31/2018
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="dateVal" mobiscroll-date="dateValSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            13:00 - 20:00
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="timeVal" mobiscroll-time="timeValSettings" />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Date formats</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            String
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="dateStr" mobiscroll-date="dateStrSettings" />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Moment JS
                            <input mbsc-input data-input-style="box" data-label-style="stacked" ng-model="moment" mobiscroll-date="momentSettings" />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Date & Time - Time value steps

Change demo
Time value steps

Adjust the minute, hour steps in the time picker. By default it is incrementing by one, however you can change it to anything you’d like. Need to pick values from every five minutes? You can do it with the steps setting.

mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    lang: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.settings = {
            steps: {
                minute: 5
            },
            dateWheels: '|D M d|'
        };

        $scope.settingsTime = {
            steps: {
                minute: 15
            }
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form="formSettings">
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Variable Steps</div>
            <label>
                Date & time
                <input mbsc-input ng-model="mytime" mobiscroll-datetime="settings" mobiscroll-instance="demo" placeholder="Please Select..." />
            </label>
            <label>
                Time
                <input mbsc-input ng-model="mytime12h" mobiscroll-time="settingsTime" mobiscroll-instance="demo" placeholder="Please Select..." />
            </label>
        </div>
    </div>
</div>

Date & Time - Setting values

Change demo
Setting values

Values can change a couple different ways: though defaults, intracting with the UI or programatically. The date and time picker defaults to now, which can be easily overridden with the defaultValue setting. The values are set by interacting with the component and making a selection or it can be done programatically with the setVal method. Use the buttons setting for showing/hiding set, cancel, clear, now or add custom buttons.

mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    lang: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.defaultSettings = {
            defaultValue: new Date(2018, 2, 2)
        };

        $scope.customVal = {
            display: 'inline'
        };

        $scope.today = new Date();
        $scope.customDate = new Date(2018, 0, 2);

        $scope.nowSettings = {
            buttons: ['now', 'set', 'cancel']
        };

        $scope.customSettings = {
            buttons: [{
                    text: 'Custom',
                    handler: function (event, inst) {
                        inst.setVal(new Date(2018, 0, 1), true, true, false, 1000);
                    }
                },
                'set',
                'cancel'
            ]
        };

        $scope.autoSettings = {
            buttons: ['cancel']
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Controlling the default value</div>
            <label>
                Default
                <input mbsc-input ng-model="demo" mobiscroll-date placeholder="Please Select..." />
            </label>
            <label>
                Custom default
                <input mbsc-input ng-model="default" mobiscroll-date="defaultSettings" placeholder="Please Select..." />
            </label>
        </div>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Setting a custom value</div>
            <div class="mbsc-btn-group-block">
                <button mbsc-button ng-click="customDemo.setVal(customDate, true, true, false, 1000)">02-01-2018</button>
                <button mbsc-button ng-click="customDemo.setVal(today, true, true, false, 1000)">Today</button>
            </div>
            <div ng-model="customVal" mobiscroll-date="customVal" mobiscroll-instance="customDemo"></div>
        </div>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Buttons API</div>
            <label>
                Now
                <input mbsc-input ng-model="now" mobiscroll-date="nowSettings" placeholder="Please Select..." />
            </label>
            <label>
                Custom
                <input mbsc-input ng-model="custom" mobiscroll-date="customSettings" placeholder="Please Select..." />
            </label>
            <label>
                Auto set
                <input mbsc-input ng-model="auto" mobiscroll-date="autoSettings" placeholder="Please Select..." />
            </label>
        </div>
    </div>
</div>

Date & Time - Formatting values

Change demo
Formatting values

Set the date and time format accordingly. Formats are inherited from the localization settings, but can be overriden with the dateFomat, timeFormat settings. The scrollable wheels are controlled by the dateWheels and timeWheels settings.

Interested in learning about localization?  Check out the examples below →
mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    lang: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        var now = new Date();

        $scope.date = now;
        $scope.sep = now;
        $scope.month_only = now;
        $scope.month = now;
        $scope.year = now;
        $scope.day = now;
        $scope.atom = now;
        $scope.cookie = now;
        $scope.time = now;
        $scope.h12 = now;
        $scope.h24 = now;
        $scope.hms = now;
        $scope.datetime = now;
        $scope.datetimeDay = now;

        $scope.sepSettings = {
            dateFormat: 'dd.mm.yy'
        };

        $scope.month_onlySettings = {
            dateFormat: 'MM'
        };

        $scope.monthSettings = {
            dateFormat: 'd MM yy'
        };

        $scope.yearSettings = {
            dateFormat: 'mm/yy'
        };

        $scope.daySettings = {
            dateFormat: 'D d M, yy'
        };

        $scope.atomSettings = {
            dateFormat: 'yy-mm-dd'
        };

        $scope.cookieSettings = {
            dateFormat: 'D, dd M yy'
        };

        $scope.h12Settings = {
            timeFormat: 'hh:ii A'
        };

        $scope.h24Settings = {
            timeFormat: 'HH:ii'
        };

        $scope.hmsSettings = {
            timeFormat: 'HH:ii:ss',
            headerText: 'Time: {value}'
        };

        $scope.datetimeDaySettings = {
            dateFormat: 'D d M, yy',
            timeFormat: 'H:ii',
            dateWheels: '|D d M, yy|'
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Date</div>
            <label>
                Default
                <input mbsc-input ng-model="date" mobiscroll-date="dateSettings" />
            </label>
            <label>
                Separator
                <input mbsc-input ng-model="sep" mobiscroll-date="sepSettings" />
            </label>
            <label>
                Month only
                <input mbsc-input ng-model="month_only" mobiscroll-date="month_onlySettings"/>
            </label>
            <label>
                Month name
                <input mbsc-input ng-model="month" mobiscroll-date="monthSettings"/>
            </label>
            <label>
                Month/year
                <input mbsc-input ng-model="year" mobiscroll-date="yearSettings"/>
            </label>
            <label>
                Day of week
                <input mbsc-input ng-model="day" mobiscroll-date="daySettings" />
            </label>
            <label>
                ATOM
                <input mbsc-input ng-model="atom" mobiscroll-date="atomSettings" />
            </label>
            <label>
                COOKIE
                <input mbsc-input ng-model="cookie" mobiscroll-date="cookieSettings" />
            </label>
        </div>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Time</div>
            <label>
                Default
                <input mbsc-input ng-model="time" mobiscroll-time="timeSettings" />
            </label>
            <label>
                12 h
                <input mbsc-input ng-model="h12" mobiscroll-time="h12Settings" />
            </label>
            <label>
                24 h
                <input mbsc-input ng-model="h24" mobiscroll-time="h24Settings" />
            </label>
            <label>
                Hour, min, sec
                <input mbsc-input ng-model="hms" mobiscroll-time="hmsSettings" />
            </label>
        </div>
        <div class="mbsc-form-group">
            <div class="mbsc-form-group-title">Date & Time</div>
            <label>
                Default
                <input mbsc-input ng-model="datetime" mobiscroll-datetime="datetimeSettings" />
            </label>
            <label>
                Day name
                <input mbsc-input ng-model="datetimeDay" mobiscroll-datetime="datetimeDaySettings" />
            </label>
        </div>
    </div>
</div>

Date & Time - RTL Support

Change demo
RTL Support

Shipping with full RTL support, choose left-to-right or right-to-left with the rtl setting. The value is inherited from the localization settings, and can be manually overriden by explicitly turning it ON and OFF.

Learn more about RTL and accessibility  Browse the documentation →
mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    lang: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', '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-date="arabicSettings" placeholder="Please Select..." />
            </label>
            <label>
                Hebrew
                <input mbsc-input ng-model="hebrew" mobiscroll-date="hebrewSettings" placeholder="Please Select..." />
            </label>
            <label>
                Farsi
                <input mbsc-input ng-model="farsi" mobiscroll-date="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-date="rtlSettings" placeholder="Please Select..." />
            </label>
        </div>
    </div>
</div>

Date & Time - Calendar systems

Change demo
Calendar systems

The event calendar supports multiple calendar systems. You can control it with the calendarSystem setting, and it supports the following options:

  • Gregorian - it is included by default
  • Jalali - it is the default system of the Persian calendar and is inlcuded within the Farsi language pack
  • Hijri - it is included in the Arabic language pack
Interested in localization?  Explore this example →
mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.gregorianSettings = {
            calendarSystem: 'gregorian'
        }

        $scope.jalaliSettings = {
            calendarSystem: 'jalali',
            lang: 'fa'
        }

        $scope.hijriSettings = {
            calendarSystem: 'hijri',
            lang: 'ar'
        }

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Gregorian
                        <input mbsc-input ng-model="gregorian" mobiscroll-date="gregorianSettings" data-input-style="box" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Jalali
                        <input mbsc-input ng-model="jalali" mobiscroll-date="jalaliSettings" data-input-style="box" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Hijri
                        <input mbsc-input ng-model="hijri" mobiscroll-date="hijriSettings" data-input-style="box" placeholder="Please Select..." />
                    </label>
                </div>
            </div>
        </div>
    </div>
</div>

Date & Time - Localization

Change demo
Localization

All components are fully localized. In case of the date picker this covers date and time format, button copy, rtl and more. You can see how each example shows up by clicking on the small flag icon or checking the examples below.

All settings can be manually overriden  See what options the localization impacts →
mobiscroll.settings = {
    theme: '',
    themeVariant: '',
    display: 'bubble'
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.englishSettings = {
            lang: 'en'
        };

        $scope.arabicSettings = {
            lang: 'ar'
        };

        $scope.bulgarianSettings = {
            lang: 'bg'
        };

        $scope.catalaSettings = {
            lang: 'ca'
        };

        $scope.cestinaSettings = {
            lang: 'cs'
        };

        $scope.chineseSettings = {
            lang: 'zh'
        };

        $scope.croatianSettings = {
            lang: 'hr'
        };

        $scope.danskSettings = {
            lang: 'da'
        };

        $scope.deutschSettings = {
            lang: 'de'
        };

        $scope.englishUkSettings = {
            lang: 'en-UK'
        };

        $scope.espanolSettings = {
            lang: 'es'
        };

        $scope.francaisSettings = {
            lang: 'fr'
        };

        $scope.greekSettings = {
            lang: 'el'
        };

        $scope.hindiSettings = {
            lang: 'hi'
        };

        $scope.italianoSettings = {
            lang: 'it'
        };

        $scope.japaneseSettings = {
            lang: 'ja'
        };

        $scope.koreanSettings = {
            lang: 'ko'
        };

        $scope.lietuviuSettings = {
            lang: 'lt'
        };

        $scope.magyarSettings = {
            lang: 'hu'
        };

        $scope.nederlandsSettings = {
            lang: 'nl'
        };

        $scope.norskSettings = {
            lang: 'no'
        };

        $scope.polskiSettings = {
            lang: 'pl'
        };

        $scope.portuguesSettings = {
            lang: 'pt-PT'
        };

        $scope.brasileiroSettings = {
            lang: 'pt-BR'
        };

        $scope.romanaSettings = {
            lang: 'ro'
        };

        $scope.serbianSettings = {
            lang: 'sr'
        };

        $scope.slovencinaSettings = {
            lang: 'sk'
        };

        $scope.suomiSettings = {
            lang: 'fi'
        };

        $scope.svenskaSettings = {
            lang: 'sv'
        };

        $scope.thaiSettings = {
            lang: 'th'
        };

        $scope.turkceSettings = {
            lang: 'tr'
        };

        $scope.ukrainianSettings = {
            lang: 'ua'
        };

        $scope.vietnameseSettings = {
            lang: 'vi'
        };

        $scope.russianSettings = {
            lang: 'ru'
        };

        $scope.russianUaSettings = {
            lang: 'ru-UA'
        };

        $scope.hebrewSettings = {
            lang: 'he'
        };

        $scope.farsiSettings = {
            lang: 'fa'
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form class="md-localization">
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-en"></span>
                        English
                        <input mbsc-input data-input-style="box" ng-model="english" mobiscroll-datetime="englishSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ar"></span>
                        Arabic
                        <input mbsc-input data-input-style="box" ng-model="arabic" mobiscroll-datetime="arabicSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-bg"></span>
                        Bulgarian
                        <input mbsc-input data-input-style="box" ng-model="bulgarian" mobiscroll-datetime="bulgarianSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ca"></span>
                        Català
                        <input mbsc-input data-input-style="box" ng-model="catala" mobiscroll-datetime="catalaSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-cs"></span>
                        Cestina
                        <input mbsc-input data-input-style="box" ng-model="cestina" mobiscroll-datetime="cestinaSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-zh"></span>
                        Chinese
                        <input mbsc-input data-input-style="box" ng-model="chinese" mobiscroll-datetime="chineseSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-hr"></span>
                        Croatian
                        <input mbsc-input data-input-style="box" ng-model="croatian" mobiscroll-datetime="croatianSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-da"></span>
                        Dansk
                        <input mbsc-input data-input-style="box" ng-model="dansk" mobiscroll-datetime="danskSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-de"></span>
                        Deutsch
                        <input mbsc-input data-input-style="box" ng-model="deutsch" mobiscroll-datetime="deutschSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-en-UK"></span>
                        English (UK)
                        <input mbsc-input data-input-style="box" ng-model="englishUk" mobiscroll-datetime="englishUkSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-es"></span>
                        Español
                        <input mbsc-input data-input-style="box" ng-model="espanol" mobiscroll-datetime="espanolSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-fr"></span>
                        Français
                        <input mbsc-input data-input-style="box" ng-model="francais" mobiscroll-datetime="francaisSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-gr"></span>
                        Greek
                        <input mbsc-input data-input-style="box" ng-model="greek" mobiscroll-datetime="greekSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-in"></span>
                        Hindi
                        <input mbsc-input data-input-style="box" ng-model="hindi" mobiscroll-datetime="hindiSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-it"></span>
                        Italiano
                        <input mbsc-input data-input-style="box" ng-model="italiano" mobiscroll-datetime="italianoSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ja"></span>
                        Japanese
                        <input mbsc-input data-input-style="box" ng-model="korean" mobiscroll-datetime="koreanSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-kr"></span>
                        Korean
                        <input mbsc-input data-input-style="box" ng-model="lietuviu" mobiscroll-datetime="lietuviuSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-lt"></span>
                        Lietuvių
                        <input mbsc-input data-input-style="box" ng-model="magyar" mobiscroll-datetime="magyarSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-hu"></span>
                        Magyar
                        <input mbsc-input data-input-style="box" ng-model="nederlands" mobiscroll-datetime="nederlandsSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-nl"></span>
                        Nederlands
                        <input mbsc-input data-input-style="box" ng-model="norsk" mobiscroll-datetime="norskSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-no"></span>
                        Norsk
                        <input mbsc-input data-input-style="box" ng-model="polski" mobiscroll-datetime="polskiSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-pl"></span>
                        Polski
                        <input mbsc-input data-input-style="box" ng-model="english" mobiscroll-datetime="englishSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-pt-PT"></span>
                        Português Europeu
                        <input mbsc-input data-input-style="box" ng-model="portugues" mobiscroll-datetime="portuguesSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-pt-BR"></span>
                        Pt. Brasileiro
                        <input mbsc-input data-input-style="box" ng-model="brasileiro" mobiscroll-datetime="brasileiroSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ro"></span>
                        Româna
                        <input mbsc-input data-input-style="box" ng-model="romana" mobiscroll-datetime="romanaSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-sr"></span>
                        Serbian
                        <input mbsc-input data-input-style="box" ng-model="serbian" mobiscroll-datetime="serbianSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-sk"></span>
                        Slovencina
                        <input mbsc-input data-input-style="box" ng-model="slovencina" mobiscroll-datetime="slovencinaSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-fi"></span>
                        Suomi
                        <input mbsc-input data-input-style="box" ng-model="suomi" mobiscroll-datetime="suomiSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-sv"></span>
                        Svenska
                        <input mbsc-input data-input-style="box" ng-model="svenska" mobiscroll-datetime="svenskaSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-th"></span>
                        Thai
                        <input mbsc-input data-input-style="box" ng-model="thai" mobiscroll-datetime="thaiSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-tr"></span>
                        Türkçe
                        <input mbsc-input data-input-style="box" ng-model="turkce" mobiscroll-datetime="turkceSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ua"></span>
                        Ukrainian
                        <input mbsc-input data-input-style="box" ng-model="ukrainian" mobiscroll-datetime="ukrainianSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-vi"></span>
                        Vietnamese
                        <input mbsc-input data-input-style="box" ng-model="vietnamese" mobiscroll-datetime="vietnameseSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ru"></span>
                        Русский
                        <input mbsc-input data-input-style="box" ng-model="russian" mobiscroll-datetime="russianSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-ru-UA"></span>
                        Русский (UA)
                        <input mbsc-input data-input-style="box" ng-model="russian" mobiscroll-datetime="russianUaSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-he"></span>
                        עברית
                        <input mbsc-input data-input-style="box" ng-model="hebrew" mobiscroll-datetime="hebrewSettings" placeholder="Please Select..." />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                    <label>
                        <span class="flag flag-fa"></span>
                        فارسی
                        <input mbsc-input data-input-style="box" ng-model="farsi" mobiscroll-datetime="farsiSettings" placeholder="Please Select..." lang="fa" />
                    </label>
                </div>
            </div>
        </div>
    </div>
</div>
.md-localization span.flag {
    width: 22px;
    height: 15px;
    position: absolute;
    left: 1em;
    z-index: 1;
    top: 8px;
}

.mbsc-rtl .md-localization span.flag {
    right: 1em;
}

.mbsc-ios .md-localization span.flag {
    top: 15px;
}

.md-localization .flag~.mbsc-label {
    margin-left: 38px;
}

.mbsc-rtl .md-localization .flag~.mbsc-label {
    margin-right: 38px;
}

.md-localization img.flag {
    width: 30px;
}

.md-localization .flag {
    background: url(https://img.mobiscroll.com/demos/flags/flags_responsive.png) no-repeat;
    background-size: 100%;
}

.md-localization .flag-en {
    background-position: 0 93.38843%;
}

.md-localization .flag-ar {
    background-position: 0 76.033058%;
}

.md-localization .flag-bg {
    background-position: 0 9.090909%;
}

.md-localization .flag-ca {
    background-position: 0 14.876033%;
}

.md-localization .flag-cs {
    background-position: 0 21.900826%;
}

.md-localization .flag-zh {
    background-position: 0 19.008264%;
}

.md-localization .flag-hr {
    background-position: 0 38.429752%;
}

.md-localization .flag-da {
    background-position: 0 23.140496%;
}

.md-localization .flag-de {
    background-position: 0 22.31405%;
}

.md-localization .flag-en-UK {
    background-position: 0 92.561983%;
}

.md-localization .flag-es {
    background-position: 0 26.859504%;
}

.md-localization .flag-fr {
    background-position: 0 29.752066%;
}

.md-localization .flag-gr {
    background-position: 0 34.710744%;
}

.md-localization .flag-in {
    background-position: 0 40.909091%;
}

.md-localization .flag-it {
    background-position: 0 42.975207%;
}

.md-localization .flag-ja {
    background-position: 0 44.214876%;
}

.md-localization .flag-kr {
    background-position: 0 47.520661%;
}

.md-localization .flag-lt {
    background-position: 0 52.066116%;
}

.md-localization .flag-hu {
    background-position: 0 39.256198%;
}

.md-localization .flag-nl {
    background-position: 0 65.289256%;
}

.md-localization .flag-no {
    background-position: 0 65.702479%;
}

.md-localization .flag-pl {
    background-position: 0 70.661157%;
}

.md-localization .flag-pt-PT {
    background-position: 0 72.31405%;
}

.md-localization .flag-pt-BR {
    background-position: 0 11.983471%;
}

.md-localization .flag-ro {
    background-position: 0 74.380165%;
}

.md-localization .flag-sr {
    background-position: 0 74.793388%;
}

.md-localization .flag-sk {
    background-position: 0 79.752066%;
}

.md-localization .flag-fi {
    background-position: 0 27.68595%;
}

.md-localization .flag-sv {
    background-position: 0 77.68595%;
}

.md-localization .flag-th {
    background-position: 0 85.950413%;
}

.md-localization .flag-tr {
    background-position: 0 89.256198%;
}

.md-localization .flag-ua {
    background-position: 0 91.735537%;
}

.md-localization .flag-vi {
    background-position: 0 96.694215%;
}

.md-localization .flag-ru {
    background-position: 0 75.206612%;
}

.md-localization .flag-ru-UA {
    background-position: 0 10.743802%;
}

.md-localization .flag-he {
    background-position: 0 40.495868%;
}

.md-localization .flag-fa {
    background-position: 0 42.14876%;
}

Date & Time - Event hooks

Change demo
Event hooks

The date & time ships with different event hooks for deep customization. Events are triggered through the lifecycle of the component where you can tie in custom functionality and code. While users interact with the UI events like onChange, onSet, onInit ... will be triggered. Interact with the example and check the event log for the output.

For a complete list of events go to the documentation  See available lifecycle events →
Clear event log
EVENTS FIRED: 
mobiscroll.settings = {
    lang: '',
    theme: '',
    themeVariant: ''
};

angular
    .module('demoApp', ['mobiscroll-datetime', 'mobiscroll-form'])
    .controller('demoController', ['$scope', function ($scope) {

        $scope.settings = {
            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
            }
        };

    }]);
<div ng-app="demoApp" ng-controller="demoController">
    <div mobiscroll-form>
        <div class="mbsc-form-group">
            <label>
                Date picker
                <input mbsc-input ng-model="mydate" mobiscroll-date="settings" mobiscroll-instance="demo" data-label-style="stacked" data-input-style="box" placeholder="Please Select..." />
            </label>
        <div class="mbsc-btn-group">
            <button mbsc-button ng-click="demo.clear()">Clear</button>
            <button mbsc-button ng-click="demo.show()">Show</button>
        </div>
    </div>
    </div>
</div>

Date & Time - Theming capabilities

Change demo
Theming capabilities

Customize the look and feel with themes or custom CSS. There are four levels of customization:

  • Base themes: Choose between Mobiscroll, iOS, Android Material and Windows.
  • Light or dark: Every theme has a light and dark variant. Setting the themeVariant 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-datetime', '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-date="iosSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Dark
                            <input mbsc-input ng-model="iosDarkDemo" mobiscroll-date="iosDarkSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Custom
                            <input mbsc-input ng-model="iosCustomkDemo" mobiscroll-date="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-date="materialSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Dark
                            <input mbsc-input ng-model="materialDarkDemo" mobiscroll-date="materialDarkSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Custom
                            <input mbsc-input ng-model="materialCustomDemo" mobiscroll-date="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-date="windowsSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Dark
                            <input mbsc-input ng-model="windowsDarkDemo" mobiscroll-date="windowsDarkSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Custom
                            <input mbsc-input ng-model="windowsCustomkDemo" mobiscroll-date="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-date="mobiscrollSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Dark
                            <input mbsc-input ng-model="mobiscrollDarkDemo" mobiscroll-date="mobiscrollDarkSettings" placeholder="Please Select..." />
                        </label>
                        <label>
                            Custom
                            <input mbsc-input ng-model="mobiscrollCustomDemo" mobiscroll-date="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.

Total


All features will be included with the license.

Buy component license

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular JS & Ionic 1 $595


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/9 or Ionic 2/3/4. Use it when you are building your app or website with React.


Buy framework license
See other licensing options

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for AngularJS $595


  • 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
Buy framework license
See other licensing options

Framework license


Select the development framework you are using. Get all 36 components with the license.

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • 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
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

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/9 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?

Price
Buy now
Customize & try demos locally
Sign in or start your free trial

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Email address

Customize & try this demo locally
Sign in or start your free trial

We have to set you up with a trial for this to run 👍

Email address

Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ 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

Copy command
$ 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:

$ mobiscroll start ionic myStarter

Run this command for Ionic 4 & Mobiscroll starter:

$ mobiscroll start ionic-angular myStarter

Step 3.Copy the code into your app.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ionic serve in the root folder of your app 🎉

Copy command
$ ionic serve

And voilà, everything should be running smoothly.

Customize & try demos locally
How would you like to do it?
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ 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

Copy command
$ 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.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ng serve in the root folder of your app 🎉

Copy command
$ ng serve

And voilà, everything should be running smoothly.

Thanks for downloading
Try and customize the app locally

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.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ionic serve

Let us know if we can help and enjoy!

Change your password
Need to update your password? Enter and hit the button below

You are setting a password for the account

New Password Required Enter at least 6 characters
Change your password
Need to update your password? Enter and hit the button below

Your password has been changed!

Thanks for downloading
Customize demos locally

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! 👍

Thanks for downloading
Customize demos locally

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.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ng serve --open

Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

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.

Thanks for downloading
Customize demos locally

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! 👍

Demos
Alerts & notifications
Alert Notifications Note
Components
Alerts & notifications 3
Buttons 4
Calendar 27
Cards 14
Collapsible 3
Color 10
Date & Time 20
Event Calendar 25
Forms 13
Grid layout 7
Image 7
Inputs & fields 6
Listview 19
Measurement 10
Navigation 8
Number 8
Numpad 14
Option List 4
Popup 10
Range 19
Scroller 7
Scrollview 5
Select 18
Slider & progress 4
Styling 6
Timer 5
Timespan 6
Toggle & Radio 4
Treelist 7
Theme Select
Mobiscroll
Mobiscroll Dark
Material
Material Dark
iOS
iOS Dark
Bootstrap
Windows
Windows Dark
Display Mode
Language Locale
See other demos and change options
Theme
Display
Locale
See other demos