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

Date & Time - Date selection

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

$(function () {

    $('#demo').mobiscroll().date({
        theme: '',
        lang: '',
        display: ''
    });

    $('#demo-header').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        headerText: '{value}'
    });

    $('#demo-non-form').mobiscroll().date({
        theme: '',
        lang: '',
        display: ''
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">The datetime can be used inside a mobiscroll form or on any input.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Inside Mobiscroll Form</div>
        <label>
            Date
            <input id="demo" placeholder="Please Select..." />
        </label>
        <label>
            Header text
            <input id="demo-header" placeholder="Please Select..." />
        </label>
    </div>
    <div class="mbsc-form-group mbsc-padding">
        <p class="mbsc-thin">Use it on any input or non-mobiscroll form.</p>
    </div>
</div>
<div class="demo-container">
    <input id="demo-non-form" class="demo-non-form" placeholder="Please Select..." />
</div>
.demo-non-form {
    width: 100%;
    margin: 0 0 5px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 0;
    font-family: arial, verdana, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.demo-container {
    padding: 0 1em;
}

Date & Time - Time selection

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

$(function () {

    var now = new Date();

    $('#demo').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time-12h').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        timeFormat: 'hh:ii A',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time-24h').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        timeFormat: 'HH:ii',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time-hms').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        timeFormat: 'HH:ii:ss',
        headerText: 'Time: {value}',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">The time picker inherits localization settings and supports different formats.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Picking Time</div>
        <label>
            Default
            <input id="demo" />
        </label>
        <label>
            12 h
            <input id="time-12h" />
        </label>
        <label>
            24 h
            <input id="time-24h" />
        </label>
        <label>
            Hour, min, sec
            <input id="time-hms" />
        </label>
    </div>
</div>

Date & Time - Datetime selection

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

$(function () {

    $('#demo').mobiscroll().datetime({
        theme: '',
        lang: '',
        display: '',
        dateWheels: '|D M d|'
    });

    $('#exp').mobiscroll().datetime({
        theme: '',
        lang: '',
        display: ''
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Picking date and time</div>
        <label>
            Compact
            <input id="demo" placeholder="Please Select..." />
        </label>
        <label>
            Expanded
            <input id="exp" placeholder="Please Select..." />
        </label>
    </div>
</div>

Date & Time - Min & Max

Choose demo
mobiscroll.settings = {
    theme: '',
    lang: '',
    display: ''
};

$(function () {
    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());

    $('#demo').mobiscroll().date({
        min: minDate
    });

    $('#maxdate').mobiscroll().date({
        max: maxDate
    });

    $('#dob').mobiscroll().date({
        max: bday
    });

    $('#mindate').mobiscroll().date({
        min: minDate
    });

    $('#inf').mobiscroll().date();

    $('#mintime').mobiscroll().time({
        min: minTime
    });

    $('#maxtime').mobiscroll().time({
        max: maxTime
    });

    $('#minmax').mobiscroll().time({
        min: minTime,
        max: maxTime
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Time</div>
        <label>
            Min date
            <input id="demo" placeholder="Please Select..." />
        </label>
        <label>
            Max date
            <input id="maxdate" placeholder="Please Select..." />
        </label>
        <label>
            Date of birth
            <input id="dob" placeholder="Please Select..." />
        </label>
        <label>
            Infinite
            <input id="inf" placeholder="Please Select..." />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Date</div>
        <label>
            Min time
            <input id="mintime" placeholder="Please Select..." />
        </label>
        <label>
            Max time
            <input id="maxtime" placeholder="Please Select..." />
        </label>
        <label>
            Min & max
            <input id="minmax" placeholder="Please Select..." />
        </label>
    </div>
</div>

Date & Time - Setting invalids

Choose demo
mobiscroll.settings = {
    theme: '',
    lang: '',
    display: ''
};

$(function () {

    $('#demo').mobiscroll().date({
        invalid: [
            new Date(2018, 1, 3),
            new Date(2018, 6, 11)
        ]
    });

    $('#rec').mobiscroll().date({
        invalid: [
            '1/1',
            '1/2',
            '12/25',
            '12/26',
            '7/10',
            '7/13',
            '9/10',
            '11/10'
        ]
    });

    $('#week').mobiscroll().date({
        invalid: ['w0', 'w2', 'w6']
    });

    $('#daterange').mobiscroll().date({
        invalid: [
            { start: new Date(2018, 0, 27), end: new Date(2018, 2, 15) }
        ]
    });

    $('#time').mobiscroll().time({
        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' }
        ]
    })

    $('#timerange').mobiscroll().time({
        invalid: [
            { start: '12:00', end: '16:00' }
        ]
    })

});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Invalidating dates</div>
        <label>
            Exact Date
            <input id="demo" placeholder="Please Select..." />
        </label>
        <label>
            Recurring
            <input id="rec" placeholder="Please Select..." />
        </label>
        <label>
            Weekdays
            <input id="week" placeholder="Please Select..." />
        </label>
        <label>
            Range
            <input id="daterange" placeholder="Please Select..." />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Invalidating time</div>
        <label>
            Exact
            <input id="time" placeholder="Please Select..." />
        </label>
        <label>
            Range
            <input id="timerange" placeholder="Please Select..." />
        </label>
    </div>
</div>

Date & Time - Month and year

Choose demo
// Use the settings object to change the theme
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

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

    $('#demo').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        dateWheels: 'mm - MM  yy',
        dateFormat: 'mm/yy',
        min: now,
        minWidth: 100,
        max: until
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Add a new credit card</div>
        <label>
            Name
            <input type="text" placeholder="Required" />
        </label>
        <label>
            Card
            <input type="text" placeholder="Credit card number" />
        </label>
        <label>
            Expiration
            <input id="demo" type="text" placeholder="Required" value="12/2020" />
        </label>
        <label>
            Security
            <input type="text" placeholder="3-digit CVV" />
        </label>
    </div>
</div>

Date & Time - Steps

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

$(function () {

    $('#demo').mobiscroll().datetime({
        steps: {
            minute: 15
        },
        dateWheels: '|D M d|'
    });

    $('#time').mobiscroll().time({
        steps: {
            minute: 5
        }
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Set the time steps between wheel values. E.g. 5 min or 15 min.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Variable Steps</div>
        <label>
            Date & time
            <input id="demo" placeholder="Please Select..." />
        </label>
        <label>
            Time
            <input id="time" type="text" placeholder="Please Select..." />
        </label>
    </div>
</div>

Date & Time - Setting values

Choose demo
mobiscroll.settings = {
    theme: '',
    lang: '',
    display: ''
};

$(function () {

    $('#demo').mobiscroll().date();

    $('#default').mobiscroll().date({
        defaultValue: new Date(2018, 2, 2)
    });

    $('#inline').mobiscroll().date({
        display: 'inline'
    });

    $('#now').mobiscroll().date({
        buttons: ['now', 'set', 'cancel']
    });

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

});


$('#today').off().click(function () {
    $('#inline').mobiscroll('setVal', new Date(), true, true, false, 1000);
    return false;
});

$('#jan').off().click(function () {
    $('#inline').mobiscroll('setVal', new Date(2018, 1, 2), true, true, false, 1000);
    return false;
});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Controlling the default value</div>
        <label>
            Default
            <input id="demo" placeholder="Please Select..." />
        </label>
        <label>
            Custom default
            <input id="default" 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 id="jan">02-01-2018</button>
            <button id="today">Today</button>
        </div>
        <div id="inline"></div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Buttons API</div>
        <label>
            Now
            <input id="now" placeholder="Please Select..." />
        </label>
        <label>
            Custom
            <input id="custom" placeholder="Please Select..." />
        </label>
    </div>
</div>

Date & Time - Formatting values

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

$(function () {

    var now = new Date();

    $('#date').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#date-sep').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        dateFormat: 'dd.mm.yy',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#date-month').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        dateFormat: 'd MM yy',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#date-day').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        dateFormat: 'D d M, yy',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#date-atom').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        dateFormat: 'yy-mm-dd',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#date-cookie').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        dateFormat: 'D, dd M yy',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time-12h').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        timeFormat: 'hh:ii A',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time-24h').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        timeFormat: 'HH:ii',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#time-hms').mobiscroll().time({
        theme: '',
        lang: '',
        display: '',
        timeFormat: 'HH:ii:ss',
        headerText: 'Time: {value}',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#datetime').mobiscroll().datetime({
        theme: '',
        lang: '',
        display: '',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#datetime-day').mobiscroll().datetime({
        theme: '',
        lang: '',
        display: '',
        dateFormat: 'D d M, yy',
        timeFormat: 'H:ii',
        dateWheels: '|D d M, yy|',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Date</div>
        <label>
            Default
            <input id="date" />
        </label>
        <label>
            Separator
            <input id="date-sep" />
        </label>
        <label>
            Month name
            <input id="date-month" />
        </label>
        <label>
            Day of week
            <input id="date-day" />
        </label>
        <label>
            ATOM
            <input id="date-atom" />
        </label>
        <label>
            COOKIE
            <input id="date-cookie" />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Time</div>
        <label>
            Default
            <input id="time" />
        </label>
        <label>
            12 h
            <input id="time-12h" />
        </label>
        <label>
            24 h
            <input id="time-24h" />
        </label>
        <label>
            Hour, min, sec
            <input id="time-hms" />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Date & Time</div>
        <label>
            Default
            <input id="datetime" />
        </label>
        <label>
            Day name
            <input id="datetime-day" />
        </label>
    </div>
</div>

Date & Time - RTL Support

Choose demo
$(function () {

    $('#demo').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        rtl: true
    });

});
<input id="demo" placeholder="Please Select..." />

Date & Time - Event handlers

Choose demo
$(function () {

    $('#demo').mobiscroll().date({
        theme: '',
        lang: '',
        display: '',
        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
        }
    });
});
<input id="demo" placeholder="Please Select..." />
Clear event log
EVENTS FIRED: 

Date & Time - Display modes

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

$(function () {

    $('#demo-bottom').mobiscroll().date({
        display: 'bottom'
    });

    $('#demo-top').mobiscroll().date({
        display: 'top'
    });

    $('#demo-center').mobiscroll().date({
        display: 'center'
    });

    $('#demo-bubble').mobiscroll().date({
        display: 'bubble'
    });

    $('#demo-inline').mobiscroll().date({
        display: 'inline',
        layout: 'liquid'
    });

});
<div style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Try different display modes</div>
        <label>
            Bottom
            <input id="demo-bottom" placeholder="Please Select..." />
        </label>
        <label>
            Top
            <input id="demo-top" type="text" placeholder="Please Select..." />
        </label>
        <label>
            Center
            <input id="demo-center" type="text" placeholder="Please Select..." />
        </label>
        <label>
            Bubble
            <input id="demo-bubble" 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 id="demo-inline"></div>
    </div>
</div>
light
dark
light
dark

Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.

Customize & try demos locally
Please sign in or start a free trial to download

What is your main focus at the moment?

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

Install demo in your app
Follow steps to install mobiscroll and use example

Install Mobiscroll for Ionic

Step 1.

Install the Mobiscroll CLI from npm (you might need sudo access).

Copy command
$ npm install -g @mobiscroll/cli

Step 2.

Run the config command in the root folder of the Ionic project.
You will have to enter your email address/user and password (set password) of your mobiscroll account.
If you don't have an app, create a starter with the Ionic CLI $ ionic start myStarterApp tabs

Copy command
$ mobiscroll config ionic
If your app is using lazy loading, run $ mobiscroll config ionic --lazy instead.

If Mobiscroll is installed in your app, copy the demo code from below.
The HTML goes into markup, the Typescript into the TS file and the CSS into the page stylesheet (scss file). If you need to install mobiscroll use the CLI and follow these two simple steps.

Copy TS
Copy HTML
Copy CSS

Run ionic serve in the root folder of your app.

Copy command
$ ionic serve
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
New Password Required Enter at least 6 characters Please avoid dangerous characters like '<' or '&'
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.

Please extract the zip file and simply open the demos in your favorite browser. For instructions on how to install Mobiscroll in your project follow this guide.


Let us know if we can help and enjoy!

Thanks for downloading
Customize demos locally

The demos are using an in-browser TypeScript transpiler app as base. Please extract the zip file and open the index.html on your local development server.

Alternatively you can use live-server. For installation and usage, open a terminal window and follow these steps.

Step 1. Install live-server
$ npm install -g live-server
Step 2. Start server & run app
$ live-server

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. Please extract the zip file and open the demos in your browser.


Let us know if we can help and enjoy!

Demos
Controls
Calendar 17
Cards 9
Color 8
Date & Time 12
Event Calendar 7
Forms 23
Image 5
Listview 18
Measurement 14
Navigation 6
Number 6
Numpad 12
Option List 4
Range 14
Scroller 5
Scrollview 4
Select 11
Styling 4
Timer 4
Timespan 5
Treelist 5
Widget 8
Demo Apps 5
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