Calendar for jQuery and jQuery Mobile

Learn about Calendar

Date & time picker component featuring calendar month view, week view, date scroller and time picker.

Use it on responsive websites and mobile apps. Compatible with mobiscroll forms, custom input and more.

Shipping with useful features for a refined UX, including:

  • Usage on mobile and desktop with responsive features
  • Single and multiple select
  • Week select
  • Date & time select
  • Validation with disabled dates, min & max for restricting selection
  • Marked days
  • Week counter
  • Multiple month view
  • Fullscreen view
  • Modal, popup and inline display support
  • RTL Support
  • Full localization


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

Date & Time Range Event Calendar


Calendar demos available for other frameworks.

Viewing demos & code for

light
dark

Change the theme setting here

Calendar - Mobile & Desktop usage

Change demo
Mobile & Desktop usage

Use the calendar view for both mobile and desktop or set it up responsively. The main difference between the two rendering modes - controlled by the touchUi setting - is how the calendar is laid out. When set to false the component shows up suitable for larger screens and pointer interaction while setting it to true renders it suitable for touch screens.

Handle different screen sizes by setting it up responsively  Check out the responsive demo →
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

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

    $('#demo-desktop').mobiscroll().calendar({
        display: 'bubble',
        touchUi: false
    });

});
<div mbsc-form style="max-width:900px;margin:0 auto;">
    <div class="mbsc-grid mbsc-form-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label>
                    Mobile
                    <input id="demo-mobile" data-input-style="box" placeholder="Please Select..." />
                </label>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label>
                    Desktop
                    <input id="demo-desktop" data-input-style="box" placeholder="Please Select..." />
                </label>
            </div>
        </div>
    </div>
</div>

Calendar - App & Website usage

Change demo
App & Website usage

Use it on any custom input or with Mobiscroll form fields. The calendar is shown on input focus, but it can also be triggered on a button click or it can be embedded directly into the page.

Let’s say you already have a form and you want to enhance date selection. You can use it on existing fields or new fields.

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

$(function () {

    $('#demo-app-website-form').mobiscroll().form({
        inputStyle: 'box'
    });

    $('#demo-app-date').mobiscroll().calendar();

    $('#demo-app-time').mobiscroll().calendar({
        controls: ['calendar', 'time']
    });

    $('#demo-app-date-non-form').mobiscroll().calendar();

    var instance = $('#demo-app-date-external').mobiscroll().calendar({
        showOnTap: false,
        showOnFocus: false,
        controls: ['calendar', 'time'],
        onInit: function (event, inst) {
            inst.setVal(new Date(), true);
        }
    }).mobiscroll('getInst');

    $('#show-demo-app-date-external').click(function () {
        instance.show();
        return false;
    });

});
<div style="max-width:900px;margin:0 auto;" mbsc-page>    <div id="demo-app-website-form">
        <div class="mbsc-grid mbsc-form-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Using the Calendar with Mobiscroll form fields</div>
                <div class="mbsc-row">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Date
                            <input id="demo-app-date" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                            Date & Time
                            <input id="demo-app-time" placeholder="Please Select..." />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-note mbsc-note-primary mbsc-align-center">Use the calendar on any non-mobiscroll form field.</div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-app-date-non-form">Date</label>
                <input id="demo-app-date-non-form" 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" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button id="show-demo-app-date-external" 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%;
}

Calendar - Date types

Change demo
Date types

The calendar works with multiple data types:

  • 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'
  • Moment.js objects - moment([2018, 3, 27, 12, 15])
mobiscroll.settings = {
    theme: '',
    lang: ''
};

$(function () {

    var dateInstance = $('#demo-date').mobiscroll().calendar({
            onSet: function (event, inst) {
                updateValue('returnVal', inst);
            }
        }).mobiscroll('getInst'),

        isoInstance = $('#demo-iso').mobiscroll().calendar({
            returnFormat: 'iso8601',
            onSet: function (event, inst) {
                updateValue('returnISO', inst);
            }
        }).mobiscroll('getInst'),

        localeInstance = $('#demo-locale').mobiscroll().calendar({
            returnFormat: 'locale',
            onSet: function (event, inst) {
                updateValue('returnLocale', inst);
            }
        }).mobiscroll('getInst'),

        momentInstance = $('#demo-moment').mobiscroll().calendar({
            returnFormat: 'moment',
            onSet: function (event, inst) {
                updateValue('returnMoment', inst);
            }
        }).mobiscroll('getInst');

    $('#setDate').click(function () {
        $('#demo').mobiscroll('setVal', new Date(1995, 11, 17, 15, 24), true);
        updateValue('returnVal', dateInstance);
    });

    $('#setISO').click(function () {
        $('#demo-iso').mobiscroll('setVal', '2008-09-15T15:53:00', true);
        updateValue('returnISO', isoInstance);
    });

    $('#setLocale').click(function () {
        $('#demo-locale').mobiscroll('setVal', '04/25/2010 8:15 AM', true);
        updateValue('returnLocale', localeInstance);
    });

    $('#setMoment').click(function () {
        // make sure that moment js is loaded
        $('#demo-moment').mobiscroll('setVal', moment([2018, 3, 27, 12, 15]), true);
        updateValue('returnMoment', momentInstance);
    });

    function updateValue(id, inst) {
        if (id == 'returnMoment') {
            document.getElementById(id).innerHTML = inst.getVal().format();
        } else {
            document.getElementById(id).innerHTML = inst.getVal();
        }
    }

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Javascript date objects, ISO 8601 date strings and moment.js is supported!</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Working with Js Date Objects</div>
        <div class="mbsc-btn-group-block">
            <button id="setDate" class="mbsc-btn-primary">Set: Sun Dec 17 1995 03:24:00 GMT</button>
        </div>
        <div>
            <label>
                Date object
                <input id="demo-date" />
            </label>
        </div>
    </div>
    <div class="mbsc-form-group mbsc-padding">
        Return value: <text id="returnVal"></text>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Working with Date strings</div>
        <div class="mbsc-btn-group-block">
            <button id="setISO" class="mbsc-btn-primary">Set: 2008-09-15T15:53:00</button>
        </div>
        <div>
            <label>
                ISO string
                <input id="demo-iso" />
            </label>
        </div>
    </div>
    <div class="mbsc-form-group mbsc-padding">
        Return value: <text id="returnISO"></text>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Working with Localized Strings</div>
        <div class="mbsc-btn-group-block">
            <button id="setLocale" class="mbsc-btn-primary">Set: 04/25/2010 8:15 AM</button>
        </div>
        <div>
            <label>
                Locale format
                <input id="demo-locale" />
            </label>
        </div>
    </div>
    <div class="mbsc-form-group mbsc-padding">
        Return value: <text id="returnLocale"></text>
    </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 id="setMoment" class="mbsc-btn-primary">Set: 2018-04-18T15:00:00+03:00</button>
        </div>
        <div>
            <label>
                Moment JS
                <input id="demo-moment" />
            </label>
        </div>
    </div>
    <div class="mbsc-form-group mbsc-padding">
        Return value: <text id="returnMoment"></text>
    </div>
</div>

Calendar - Mobile display modes

Change demo
Mobile display modes

Different display modes can be used for mobile and desktop. On mobile, the calendar can be rendered 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 →
// Use the settings object to change the theme
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

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

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

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

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

    $('#demo-fullscreen').mobiscroll().calendar({
        display: 'center',
        layout: 'liquid'
    });

    $('#demo-inline').mobiscroll().calendar({
        display: 'inline'
    });

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">The different display modes are supported for both mobile & desktop.</div>
    </div>
    <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>
        <label>
            Fullscreen
            <input id="demo-fullscreen" 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 calendar component in almost any markup or form.</p>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Embedded calendar</div>
        <div id="demo-inline"></div>
    </div>
</div>

Calendar - 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: ''
};

$(function () {

    $('#demo-top').mobiscroll().calendar({
        display: 'top',
        touchUi: false
    });

    $('#demo-bottom').mobiscroll().calendar({
        display: 'bottom',
        touchUi: false
    });

    $('#demo-anchored').mobiscroll().calendar({
        touchUi: false
    });

    $('#demo-center').mobiscroll().calendar({
        display: 'center',
        touchUi: false
    });

    $('#demo-datetime').mobiscroll().calendar({
        touchUi: false,
        controls: ['calendar', 'time']
    });

    $('#demo-date').mobiscroll().calendar({
        touchUi: false,
        controls: ['calendar']
    });
    
    $('#demo-set').mobiscroll().calendar({
        display: 'center',
        touchUi: false,
        buttons: ['set']
    });

    $('#demo-set-cancel').mobiscroll().calendar({
        display: 'center',
        touchUi: false,
        buttons: ['set', 'cancel']
    });
});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">The Calendar component can be used on mobile and desktop. See desktop functionality below.</div>
    </div>
    <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 id="demo-top" placeholder="Please Select..." />
                    </label>
                    <label>
                        Bottom
                        <input id="demo-bottom" placeholder="Please Select..." />
                    </label>
                    <label>
                        Anchored
                        <input id="demo-anchored" placeholder="Please Select..." />
                    </label>
                    <label>
                        Center
                        <input id="demo-center" 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 id="demo-datetime" placeholder="Please Select..." />
                    </label>
                    <label>
                        Date
                        <input id="demo-date" 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 id="demo-set" placeholder="Please Select..." />
                    </label>
                    <label>
                        Set/Cancel
                        <input id="demo-set-cancel" placeholder="Please Select..." />
                    </label>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - Responsive

Change demo
Responsive

Set up the Calendar to behave responsively. Use the appriopriate positioning and rendering based on the screen size. You can have a bottom positioned calendar 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 where you pass the options for each breakpoint.

responsive: {
    xsmall: { ... }, small: { ... }, medium: { ... }, large: { ... }, xlarge: { ... }
}

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

$(function () {



    $('#demo-date').mobiscroll().calendar({
        responsive: {
            xsmall: {
                controls: ['date']
            },
            small: {
                controls: ['calendar'],
                display: 'bubble'
            },
            medium: {
                controls: ['calendar'],
                months: 2,
                yearChange: false,
                touchUi: false
            }
        }
    });

    $('#demo-display').mobiscroll().calendar({
        responsive: {
            small: {
                controls: ['calendar'],
                display: 'center'
            },
            medium: {
                display: 'bubble',
                touchUi: false
            }
        }
    });

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Create fully responsive behaviour with the <code>responsive</code> setting.</div>
    </div>

    <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
                        <input id="demo-date" placeholder="Please Select..." />
                    </label>
                    <label>
                        Display
                        <input id="demo-display" 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-note mbsc-note-secondary">
                    <p class="mbsc-align-left">Use the built-in breakpoints or add custom widths in pixels:</p>
                    <ul class="mbsc-align-left">
                        <li>The examples have default, mobile first positioning <b>up to 575px</b></li>
                        <li>Bubble positioning is <b>between 576px and 767px</b></li>
                        <li>Desktop rendering kicks in <b>starting with 768px</b></li>
                    </ul>
                    <p class="mbsc-align-left">You can also switch between scroller and calendar depending on the screen size.</p>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - Date picker

Change demo
Date picker

Use the calendar view for date selection. Navigate it by clicking the arrows next to the year and month or by swiping. The dateFormat controls how the selected value looks. Check out some great examples for custom formats or if you are interested in a scroller UI, take a look at the date scroller.

Interested in a date & time picker?  Check out the calendar with time picker →
mobiscroll.settings = {
    lang: '',
    theme: '',
    display: 'bubble'
};

$(function () {

    var now = new Date();

    $('#demo-calendar-mobile').mobiscroll().calendar({
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-calendar-desktop').mobiscroll().calendar({
        touchUi: false,
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-calendar-header').mobiscroll().calendar({
        headerText: '{value}',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-calendar-non-form').mobiscroll().calendar({
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    var instance = $('#demo-calendar-date-external').mobiscroll().calendar({
        showOnTap: false,
        showOnFocus: false,
        onInit: function (event, inst) {
            inst.setVal(new Date(), true);
        }
    }).mobiscroll('getInst');;

    $('#show-demo-calendar-date-external').click(function () {
        instance.show();
        return false;
    });

});
<div style="max-width:1000px;margin:0 auto;" mbsc-page>    <div mbsc-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 id="demo-calendar-mobile" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Desktop
                        <input id="demo-calendar-desktop" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Header text
                        <input id="demo-calendar-header" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-note mbsc-note-primary mbsc-align-center">Use the calendar on any non-mobiscroll form field.</div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-calendar-non-form">Date</label>
                <input id="demo-calendar-non-form" 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-calendar-date-external">Show on button click only</label>
                        <input id="demo-calendar-date-external" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button id="show-demo-calendar-date-external" 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;
}

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

.external-container {
    display: flex;
}

.external-container button.external-button {
    font-weight: 400;
    padding: 10px;
    margin: 6px 0 12px 16px;
}

Calendar - Date & Time picker

Change demo
Date & Time picker

Besides date-only functionality you can use the component as a combined date and time picker. Select the date from a calendar view and the time woth an hour and minute picker.

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

Interested in a scroller component?  Check out the date & time scroller →
mobiscroll.settings = {
    lang: '',
    theme: '',
    display: 'bubble'
};

$(function () {

    var now = new Date();

    $('#demo-calendar-mobile').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-calendar-desktop').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        touchUi: false,
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-calendar-header').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        headerText: '{value}',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-calendar-non-form').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    var instance = $('#demo-calendar-date-time-external').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        showOnTap: false,
        showOnFocus: false,
        onInit: function (event, inst) {
            inst.setVal(new Date(), true);
        }
    }).mobiscroll('getInst');;

    $('#show-demo-calendar-date-time-external').click(function () {
        instance.show();
        return false;
    });

});
<div style="max-width:1000px;margin:0 auto;" mbsc-page>    <div mbsc-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 id="demo-calendar-mobile" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Desktop
                        <input id="demo-calendar-desktop" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <label>
                        Header text
                        <input id="demo-calendar-header" data-input-style="box" data-label-style="stacked" />
                    </label>
                </div>
            </div>
        </div>
    </div>
    <div class="mbsc-note mbsc-note-primary mbsc-align-center">Use the calendar on any non-mobiscroll form field.</div>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <label for="demo-calendar-non-form">Date</label>
                <input id="demo-calendar-non-form" 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-calendar-date-time-external">Show on button click only</label>
                        <input id="demo-calendar-date-time-external" class="demo-non-form" />
                    </div>
                    <div class="mbsc-col-3 external-container">
                        <button id="show-demo-calendar-date-time-external" 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;
}

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

.external-container {
    display: flex;
}

.external-container button.external-button {
    font-weight: 400;
    padding: 10px;
    margin: 6px 0 12px 16px;
}

Calendar - Multiple day selection

Change demo
Multiple day selection

You can pick between single and mutiple day selection. Multi-date select is useful when users need to pick from a set of dates that are not necessarily in a range. Passing select: 'multiple' or a number, like select: 5 enables multiple day selection.

The latter also sets a maximum selectable, so passing select: 5 means a maximum number of five dates can be selected.

Interested in date range selection?  Check out the range picker →
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

    $('#demo-multi-day').mobiscroll().calendar({
        display: 'inline',
        select: 'multiple'
    });

    $('#demo-max-days').mobiscroll().calendar({
        display: 'inline',
        select: 5,
        headerText: 'Pick up to 5 days'
    });

    $('#demo-counter').mobiscroll().calendar({
        display: 'inline',
        select: 'multiple',
        counter: true
    });

});
<div style="max-width:1100px;margin:0 auto;" mbsc-page><div mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Multi-day</div>
                    <div id="demo-multi-day"></div>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Max days</div>
                    <div id="demo-max-days"></div>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Counter</div>
                    <div id="demo-counter"></div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

Calendar - Week selection

Change demo
Week selection

You can select entire weeks instead of single days. This is useful when users need to select a full week instead of a variable range. It can be activated with selectType: 'week'. Single or multiple weeks can be selected based on the select: 'single','multiple' or integer setting. You can also control the day the week starts with the firstDay setting.

Interested in a variable date range selection?  Check out the range picker →
mobiscroll.settings = {
    lang: '',
    theme: ''
};


$(function () {

    var fromMonday = [],
        fromSaturday = [],
        twoWeeks = [],
        i = 0,
        j = 0;

    for (i; i < 7; i++) {
        fromMonday.push(new Date(2018, 0, 8 + i));
        fromSaturday.push(new Date(2018, 0, 6 + i));
    }

    for (j; j < 14; j++) {
        twoWeeks.push(new Date(2018, 0, 8 + j));
    }

    $('#demo-mon-sun').mobiscroll().calendar({
        display: 'inline',
        selectType: 'week',
        defaultValue: fromMonday,
        firstSelectDay: 1,
        firstDay: 1
    });

    $('#demo-sat-fri').mobiscroll().calendar({
        display: 'inline',
        selectType: 'week',
        defaultValue: fromSaturday,
        firstSelectDay: 6,
        firstDay: 1
    });

    $('#demo-multi').mobiscroll().calendar({
        display: 'inline',
        selectType: 'week',
        defaultValue: twoWeeks,
        firstSelectDay: 1,
        firstDay: 1,
        select: 'multiple'
    });
});
<div style="max-width:1100px;margin:0 auto;" mbsc-page>    <div mbsc-form>
        <div class="mbsc-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Mon-Sun</div>
                        <div id="demo-mon-sun"></div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Sat-Fri</div>
                        <div>
                            <div id="demo-sat-fri"></div>
                        </div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Multiple</div>
                        <div id="demo-multi"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - Variable week view

Change demo
Variable week view

The calendar view supports variable weeks. Save space by only displaying one or two weeks or go for a full month where it makes sense. Use the weeks setting that expects a number of rows. The default is six weeks, but feel free to play around.

Looking to dynamically switch views?  Check out the week to month view example →
// Use the settings object to change the theme
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

    $('#demo-one-week').mobiscroll().calendar({
        display: 'inline',
        weeks: 1
    })

    $('#demo-two-week').mobiscroll().calendar({
        display: 'inline',
        weeks: 2
    })

    $('#demo-three-week').mobiscroll().calendar({
        display: 'inline',
        weeks: 3
    })

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Define the number of weeks shown in the calendar view.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title"> One week view</div>
        <label>
           
            <input id="demo-one-week"  type="hidden" />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title"> Two week view</div>
        <label>
            <input id="demo-two-week" type="hidden" />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title"> Three week view</div>
        <label>
            <input id="demo-three-week" type="hidden" />
        </label>
    </div>
</div>

Calendar - Week to month view

Change demo
Week to month view

While the calendar supports variable week views there are cases when you don't want to commit to a single setup. Get the best of both worlds by dynamically letting the users switch between a week-view and a full month-view. Use the compact week-view to save space and programatically switch to a month-view when users need the full context of a month.

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

$(function () {
    var inst = $('#demo').mobiscroll().calendar({
        display: 'inline'
    }).mobiscroll('getInst');

    $('.md-view-change').change(function (ev) {
        switch (ev.target.value) {
            case 'month':
                inst.option({ weeks: 6 })
                break;
            case 'week':
                inst.option({ weeks: 1 })
                break;
        }
    });
});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Dynamically switch between week and month views via code or UI.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Month view and week view</div>
        <label>
            Month
            <input type="radio" data-role="segmented" name="view" value="month" class="md-view-change"  checked>
        </label>
        <label>
            Week
            <input type="radio" data-role="segmented" name="view" value="week" class="md-view-change">
        </label>
        <div id="demo"></div>
    </div>
</div>

Calendar - Multi month view

Change demo
Multi month view
JQuery Multi-month calendar. Show one, two or three months side by side depending on screen size. Fixed or dynamic months. For jQuery or jQuery Mobile.
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

    $('#demo-multi-month-form').mobiscroll().form({
        inputStyle: 'box',
        labelStyle: 'inline'
    });

    $('#demo-bubble-two').mobiscroll().calendar({
        display: 'bubble',
        months: 2,
        yearChange: false
    });

    $('#demo-bubble-three').mobiscroll().calendar({
        display: 'bubble',
        months: 3,
        yearChange: false
    });

    $('#demo-bubble-four').mobiscroll().calendar({
        display: 'bubble',
        months: 4,
        yearChange: false
    });

    $('#demo-bubble').mobiscroll().calendar({
        display: 'bubble',
        months: 'auto',
        yearChange: false
    });

    $('#demo-two').mobiscroll().calendar({
        display: 'center',
        months: 2,
        yearChange: false
    });

    $('#demo-three').mobiscroll().calendar({
        display: 'center',
        months: 3,
        yearChange: false
    });

    $('#demo-four').mobiscroll().calendar({
        display: 'center',
        months: 4,
        yearChange: false
    });

    $('#demo-center').mobiscroll().calendar({
        display: 'center',
        months: 'auto',
        yearChange: false
    });

});
<div style="max-width:1100px;margin:0 auto;" mbsc-page>    <div id="demo-multi-month-form">
        <div class="mbsc-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Popover calendar</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            2 months
                            <input id="demo-bubble-two" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            3 months
                            <input id="demo-bubble-three" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            4 months
                            <input id="demo-bubble-four" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Auto
                            <input id="demo-bubble" placeholder="Please Select..." />
                        </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Center positioned calendar</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            2 months
                            <input id="demo-two" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            3 months
                            <input id="demo-three" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            4 months
                            <input id="demo-four" placeholder="Please Select..." />
                        </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                            Auto
                            <input id="demo-center" placeholder="Please Select..." />
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
.md-multi-month .md-desc p {
    margin: 0;
}

Calendar - Min & max values

Change demo
Min & max values

Use the min and max settings to restrict selection. This is useful to make picking a date faster and to reduce user errors. A great example is scheduling. You want to disable past dates and maybe enable selection from the next six months. Simply restrict values with the min and max.

Looking for cherry picking and disabling dates?  See how to set invalids →
mobiscroll.settings = {
    lang: '',
    theme: '',
    display: 'bubble'
};

$(function () {
    var now = new Date(),
        yesterday = new Date(new Date().setDate(new Date().getDate() - 1)),
        tomorrow = new Date(new Date().setDate(new Date().getDate() + 1)),
        nextMonths = new Date(now.getFullYear(), now.getMonth() + 6, now.getDate());

    $('#demo-min-max-form').mobiscroll().form({
        inputStyle: 'box',
        labelStyle: 'stacked'
    });

    $('#demo-min-max-six-months').mobiscroll().calendar({
        headerText: 'Select your next visit',
        max: nextMonths,
        min: tomorrow,
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-min-max-future').mobiscroll().calendar({
        min: tomorrow,
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });


    $('#demo-min-max-past').mobiscroll().calendar({
        max: yesterday,
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-min-max-time').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        invalid: [
            { start: '00:00', end: '08:59' },
            { start: '17:01', end: '23:59' }
        ],
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-min-max-string').mobiscroll().calendar({
        max: '2018-08-31T00:00',
        min: '08/01/2018',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#demo-min-max-moment').mobiscroll().calendar({
        max: moment([2018, 8, 30]),
        min: moment([2018, 8, 1]),
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });
});
<div style="max-width:1100px;margin:0 auto;" mbsc-page>    <div id="demo-min-max-form">
        <div class="mbsc-grid">
            <div class="mbsc-form-group">
                <div class="mbsc-form-group-title">Pick a date</div>
                <div class="mbsc-row mbsc-form-grid">
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                        Next 6 months
                        <input id="demo-min-max-six-months" />
                    </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                        Future dates
                        <input id="demo-min-max-future" />
                    </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                        Past dates
                        <input id="demo-min-max-past" />
                    </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                        <label>
                        With time
                        <input id="demo-min-max-time" />
                    </label>
                    </div>
                </div>
            </div>
            <div class="mbsc-note mbsc-note-primary mbsc-align-center">Besides date objects you can use date strings and moment.js for min & max.</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 id="demo-min-max-string" />
                    </label>
                    </div>
                    <div class="mbsc-col-sm-12 mbsc-col-md-6">
                        <label>
                        Moment JS
                        <input id="demo-min-max-moment" />
                    </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - 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: '',
    display: 'inline'
};

$(function () {

    $('#demo').mobiscroll().calendar({
        invalid: [
            new Date(2018, 1, 5),
            new Date(2018, 1, 13),
            new Date(2018, 1, 18),
            new Date(2018, 1, 23)
        ],
        defaultValue: new Date(2018, 1, 14),
        weeks: 1
    });

    $('#rec').mobiscroll().calendar({
        invalid: [
            '12/24',
            '12/25',
            '12/26',
            '12/31'
        ],
        defaultValue: new Date(2018, 11, 10),
        weeks: 1
    });

    $('#week').mobiscroll().calendar({
        invalid: ['w0', 'w6'],
        weeks: 1
    });

    $('#range').mobiscroll().calendar({
        invalid: [
            { start: new Date(2018, 11, 21), end: new Date(2018, 11, 31) }
        ],
        defaultValue: new Date(2018, 11, 10),
        weeks: 1
    });

    $('#val').mobiscroll().calendar({
        invalid: [
            { start: new Date(2018, 11, 21), end: new Date(2018, 11, 31) }
        ],
        valid: [
            { start: new Date(2018, 11, 26), end: new Date(2018, 11, 30) }
        ],
        defaultValue: new Date(2018, 11, 27),
        weeks: 1
    });

    $('#dateStr').mobiscroll().calendar({
        defaultValue: '2018-07-25T00:00',
        invalid: [
            '2018-07-10T00:00',
            '2018-07-16T00:00',
            '07/19/2018',
            '07/27/2018'
        ],
        weeks: 1
    });

    // make sure that moment js is loaded
    $('#moment').mobiscroll().calendar({
        defaultValue: moment([2018, 8, 17]),
        invalid: [
            moment([2018, 8, 11]),
            moment([2018, 8, 20])
        ],
        weeks: 1
    });

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Invalidating dates can be done a couple different ways. See options below.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Invalidating exact dates</div>
        <div id="demo"></div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Invalidating recurring dates</div>
        <div id="rec"></div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Invalidating weekdays</div>
        <div id="week"></div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Invalidating date ranges</div>
        <div id="range"></div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Overriding inside invalid ranges</div>
        <div id="val"></div>
    </div>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Besides date objects you can use date strings and moment.js for invalids.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">String</div>
        <div id="dateStr"></div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Moment JS</div>
        <div id="moment"></div>
    </div>
</div>

Calendar - Booking

Change demo
Booking
Advanced JQuery Calendar booking demo with unavailable, disabled days and free selection for the next 6 months. For jQuery or jQuery Mobile.
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {
    var booked = [],
        invalid = ['w1'],
        now = new Date(),
        min = new Date(now.getFullYear(), now.getMonth(), now.getDate()),
        max = new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()),
        firstMonth = generateMonthEvents(now.getFullYear(), now.getMonth());

    booked = firstMonth.labels;
    invalid = invalid.concat(firstMonth.invalid);

    $('#demo').mobiscroll().calendar({
        display: 'inline',
        controls: ['calendar'],
        min: min,
        max: max,
        invalid: invalid,
        labels: booked,
        onMonthLoading: function (event, inst) {
            var newItems,
                isEventsLoaded = (inst.settings.labels).filter(function (v) {
                    return v.d.getMonth() == event.month + 1;
                }).length;

            if (!isEventsLoaded) {
                newItems = generateMonthEvents(event.year, event.month + 1);
                inst.settings.labels = inst.settings.labels.concat(newItems.labels);
                inst.settings.invalid = inst.settings.invalid.concat(newItems.invalid);
                inst.redraw();
            }
        }
    });

    function getRandomDay() {
        return Math.floor(Math.random() * 100) % 28 + 1;
    }

    function generateMonthEvents(year, month) {
        var isDisabled,
            tempDay,
            invalid = [],
            labels = [],
            disabledDays = [getRandomDay(), getRandomDay(), getRandomDay(), getRandomDay()];

        for (var i = 1; i <= new Date(year, month + 1, 0).getDate(); ++i) {
            tempDay = new Date(year, month, i, now.getHours(), now.getMinutes(), now.getSeconds());
            if (tempDay.getTime() >= now.getTime() && tempDay.getTime() <= max.getTime()) {
                isDisabled = disabledDays.indexOf(i) !== -1 || tempDay.getDay() == 1;
                if (isDisabled) {
                    invalid.push(tempDay);
                }
                labels.push({
                    d: tempDay,
                    text: isDisabled ? (tempDay.getDay() == 1 ? 'CLOSED' : 'FULL') : Math.round(Math.random() * 10) % 5 + 2 + ' SPOTS',
                    color: isDisabled ? '#ccc' : '#8ada8a'
                });
            }
        }

        return {
            labels: labels,
            invalid: invalid
        };
    }

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">You can set min/max to restrict selection, disable dates and add labels.</div>
    </div>
    <input id="demo" type="hidden" />
</div>

Calendar - Marked, colored & labels

Change demo
Marked, colored & labels

For additional information you can mark days with colored dots, add labels or completely color the background of the days. This offers means to add more information to the calemdar that is valuable to users. Take a look at this example of marked days and description.

You can add these with exact dates, ranges, days of week, days of month and recurring dates. When processing a lot of data you can load the marked days, labels, colors dynamically in the onMonthChange event.

Looking for an event calendar?  We have a component for that →
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {

    var now = new Date();

    $('#demo-marked').mobiscroll().calendar({
        display: 'inline',
        marked: [
            { d: '5/1', color: '#ffc400' },
            { d: '12/24', color: '#ffee00' },
            { d: '12/25', color: 'red' },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 4) },
            { d: new Date(now.getFullYear(), now.getMonth() - 2, 13) },
            { d: new Date(now.getFullYear(), now.getMonth(), 2), color: '#46c4f3' },
            { d: new Date(now.getFullYear(), now.getMonth(), 6), color: '#7e56bd' },
            { d: new Date(now.getFullYear(), now.getMonth(), 11), color: '#7e56bd' },
            { d: new Date(now.getFullYear(), now.getMonth(), 19), color: '#89d7c9' },
            { d: new Date(now.getFullYear(), now.getMonth(), 28), color: '#ea4986' },
            { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#7e56bd' },
            { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#f13f77' },
            { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#89d7c9' },
            { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#8dec7d' },
            { d: new Date(now.getFullYear(), now.getMonth(), 21), color: '#ffc400' },
            { d: new Date(now.getFullYear(), now.getMonth(), 21), color: '#8dec7d' },
            { start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), color: '#f4511e' }
        ]
    });

    $('#demo-colored').mobiscroll().calendar({
        display: 'inline',
        colors: [
            { d: '12/8', background: '#9ccc65' },
            { d: '5/1', background: 'red' },
            { d: '12/24', background: "#fff568" },
            { d: '12/25', background: "#e88080" },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 4), background: '#cfd8dc' },
            { d: new Date(now.getFullYear(), now.getMonth() + 2, 24), background: '#9575cd' },
            { d: new Date(now.getFullYear(), now.getMonth() - 2, 13), background: '#d4e157' },
            { d: new Date(now.getFullYear(), now.getMonth() - 1, 6), background: "#f4511e" },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 6), background: '#46c4f3' },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 22), background: '#7e56bd' },
            { d: new Date(now.getFullYear(), now.getMonth() - 1, 11), background: '#46c4f3' },
            { d: new Date(now.getFullYear(), now.getMonth() - 1, 29), background: '#7e56bd' },
            { d: new Date(now.getFullYear(), now.getMonth(), 2), background: '#46c4f3' },
            { d: new Date(now.getFullYear(), now.getMonth(), 3), background: '#7e56bd' },
            { d: new Date(now.getFullYear(), now.getMonth(), 11), background: '#f13f77' },
            { d: new Date(now.getFullYear(), now.getMonth(), 19), background: '#8dec7d' },
            { d: new Date(now.getFullYear(), now.getMonth(), 28), background: '#ea4986' },
            { start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), text: 'Conference', background: '#f4511e' }
        ]
    });

    $('#demo-labels').mobiscroll().calendar({
        display: 'inline',
        labels: [
            { d: '12/25', text: 'Christmas', color: "#f48fb1" },
            { d: '1/1', text: 'New year' },
            { d: '12/1', text: 'Meeting', color: '#ffc400' },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 4), text: 'Spa day', color: '#cfd8dc' },
            { d: new Date(now.getFullYear(), now.getMonth() + 2, 24), text: 'BD Party', color: '#9ccc65' },
            { d: new Date(now.getFullYear(), now.getMonth() - 2, 13), text: 'Exams', color: '#d4e157' },
            { d: new Date(now.getFullYear(), now.getMonth() - 1, 6), text: 'Trip', color: "#f4511e" },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 6), color: '#46c4f3', text: 'Pizza Night' },
            { d: new Date(now.getFullYear(), now.getMonth() + 1, 22), color: '#7e56bd', text: 'Beerpong' },
            { d: new Date(now.getFullYear(), now.getMonth() - 1, 11), color: '#46c4f3', text: 'Anniversary' },
            { d: new Date(now.getFullYear(), now.getMonth() - 1, 29), color: '#7e56bd', text: 'Pete BD' },
            { d: new Date(now.getFullYear(), now.getMonth(), 2), color: '#46c4f3', text: 'Ana BD' },
            { d: new Date(now.getFullYear(), now.getMonth(), 3), color: '#7e56bd', text: 'Concert' },
            { d: new Date(now.getFullYear(), now.getMonth(), 11), color: '#f13f77', text: 'Trip' },
            { d: new Date(now.getFullYear(), now.getMonth(), 19), color: '#8dec7d', text: 'Math exam' },
            { d: new Date(now.getFullYear(), now.getMonth(), 28), color: '#ea4986', text: 'Party' },
            { start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), text: 'Conference', color: '#f4511e' }
        ]
    });

});
<div style="max-width:1100px;margin:0 auto;" mbsc-page>    <div mbsc-form>
        <div class="mbsc-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Marked days</div>
                        <div id="demo-marked"></div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Colored days</div>
                        <div id="demo-colored"></div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-4">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Labels</div>
                        <div id="demo-labels"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - Marked days

Change demo
Marked days

When using marked days, users might be interested to see what each dot means. You can place a listview below for describing what everything means.

Looking for more options to mark days?  See how to add dots, colors and labels →
$(function () {
    var now = new Date();

    $('#demo').mobiscroll().calendar({
        display: 'inline',
        layout: 'liquid',
        theme: '',
        lang: '',
        markedDisplay: 'bottom',
        marked: [{
            d: new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6),
            color: 'rgb(28, 161, 227)'
        }, {
            d: new Date(now.getFullYear(), now.getMonth(), now.getDate() + 8),
            color: 'rgb(28, 161, 227)'
        }, {
            d: new Date(now.getFullYear(), now.getMonth(), now.getDate() + 9),
            color: 'rgb(28, 161, 227)'
        }, {
            d: new Date(now.getFullYear(), now.getMonth() + 1, 15),
            color: 'rgb(28, 161, 227)'
        }, {
            d: '11/30',
            color: 'rgb(163, 0, 38)'
        }, {
            d: '5/23',
            color: 'rgb(163, 0, 38)'
        }, {
            d: '3/12',
            color: 'rgb(163, 0, 38)'
        }, {
            d: '14',
            color: 'rgb(204,204,0)'
        }, {
            d: 'w5',
            color: 'rgb(34, 139, 34)'
        }, {
            d: '1/1',
            color: 'rgb(250,104,0)'
        }, {
            d: '1/2',
            color: 'rgb(250,104,0)'
        }, {
            d: '6/4',
            color: 'rgb(250,104,0)'
        }, {
            d: '8/4',
            color: 'rgb(250,104,0)'
        }, {
            d: '12/25',
            color: 'rgb(250,104,0)'
        }, {
            d: '12/26',
            color: 'rgb(250,104,0)'
        }]
    });

    $('.md-marked-list').mobiscroll().listview({
        lang: '',
        theme: '',
        swipe: false
    });

});
<div class="md-marked">
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Use colored dots for important events. Display event description below.</div>
    </div>

    <div id="demo"></div>

    <ul class="md-marked-list mbsc-cloak">
        <li>
            <span class="md-marked-points md-points-type1"></span> Garbage collection
        </li>
        <li>
            <span class="md-marked-points md-points-type2"></span> Special events
        </li>
        <li>
            <span class="md-marked-points md-points-type3"></span> Town council meeting
        </li>
        <li>
            <span class="md-marked-points md-points-type4"></span> Town hall closed
        </li>
        <li>
            <span class="md-marked-points md-points-type5"></span> National holidays
        </li>
    </ul>
</div>
.demo-marked-day-description {
    padding-left: 0;
    padding-right: 0;
}

.md-marked .md-marked-points {
    display: inline-block;
    vertical-align: middle;
    width: 7px;
    height: 7px;
    margin: 0 4px 0 0;
    border-radius: 7px;
    background: #aaa;
}

.md-marked .md-points-type1 {
    background: rgb(34, 139, 34);
}

.md-marked .md-points-type2 {
    background: rgb(163, 0, 38);
}

.md-marked .md-points-type3 {
    background: rgb(204, 204, 0);
}

.md-marked .md-points-type4 {
    background: rgb(28, 161, 227);
}

.md-marked .md-points-type5 {
    background: rgb(250, 104, 0);
}

.md-i-hide {
    display: none;
}

Calendar - Showing week numbers

Change demo
Showing week numbers

Enable week numbers with the weekCounter setting. Counting yearly and monthly are both supported. Use it whenever it is important to users having the week number in front of them. With weekCounter: 'year' you can start the counter from the first until the last week of the year. weekCounter: 'month' restarts the counter for every month.

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

$(function () {

    $('#demo-yearly').mobiscroll().calendar({
        weekCounter: 'year',
        display: 'inline'
    });

    $('#demo-monthly').mobiscroll().calendar({
        weekCounter: 'month',
        display: 'inline'
    });

});
<div style="max-width:800px;margin:0 auto;" mbsc-page>    <div mbsc-form>
        <div class="mbsc-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-6">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Week numbers go on for a full year</div>
                        <div id="demo-yearly"></div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-6">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Week numbers restart for every month</div>
                        <div id="demo-monthly"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - Month change direction

Change demo
Month change direction

For a great user experience the calendar can be navigated a couple of different ways:

  • By clicking or tapping on the little arrows above the calendar body
  • With touchpad swipe gestures
  • By grabbing and dragging the month with the mouse cursor
  • With fluid swipe gestures on touchscreens

All this works in two directions: vertically and horizontally. Change the month change direction with calendarScroll: 'vertical' and calendarScroll: 'horizontal'.

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

$(function () {
    
    $('#demo-horizontal').mobiscroll().calendar({
        calendarScroll: 'horizontal',
        display: 'inline'
    });

    $('#demo-vertical').mobiscroll().calendar({
        calendarScroll: 'vertical',
        display: 'inline'
    });

});
<div style="max-width:800px;margin:0 auto;" mbsc-page>    <div mbsc-form>
        <div class="mbsc-grid">
            <div class="mbsc-row">
                <div class="mbsc-col-sm-12 mbsc-col-md-6">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Horizontal navigation</div>
                        <div id="demo-horizontal"></div>
                    </div>
                </div>
                <div class="mbsc-col-sm-12 mbsc-col-md-6">
                    <div class="mbsc-form-group">
                        <div class="mbsc-form-group-title">Vertical navigation</div>
                        <div id="demo-vertical"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Calendar - Setting values

Change demo
Setting values

Values can change a couple different ways: though defaults, intracting with the UI or programatically. The calendar defaults to now, which can be easily overridden with the defaultValue setting. 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: '',
    lang: ''
};

$(function () {

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

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

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

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

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

    $('#auto').mobiscroll().calendar({
        buttons: [{
            text: 'Close',
            handler: '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, 0, 2), true, true, false, 1000);
    return false;
});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Control the default value or programatically set the value runtime.</div>
    </div>
    <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">Set 02-01-2018</button>
            <button id="today">Set 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>
        <label>
            Auto set
            <input id="auto" placeholder="Please Select..." />
        </label>
    </div>
</div>

Calendar - 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.

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

$(function () {

    var now = new Date();

    $('#calendar').mobiscroll().calendar({
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

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

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

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

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

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

    $('#datetime').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

    $('#datetime-day').mobiscroll().calendar({
        controls: ['calendar', 'time'],
        dateFormat: 'D d M, yy',
        timeFormat: 'H:ii',
        onInit: function (event, inst) {
            inst.setVal(now, true);
        }
    });

});
<div mbsc-form>
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Fully customizable date formatting is supported.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Date</div>
        <label>
            Default
            <input id="calendar"/>
        </label>
        <label>
            Separator
            <input id="calendar-sep" />
        </label>
        <label>
            Month name
            <input id="calendar-month" />
        </label>
        <label>
            Day of week
            <input id="calendar-day" />
        </label>
        <label>
            ATOM
            <input id="calendar-atom" />
        </label>
        <label>
            COOKIE
            <input id="calendar-cookie" />
        </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>

Calendar - 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 setting it true or false.

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

$(function () {

    $('#arabic').mobiscroll().calendar({
        lang: 'ar'
    });

    $('#hebrew').mobiscroll().calendar({
        lang: 'he'
    });

    $('#farsi').mobiscroll().calendar({
        lang: 'fa'
    });

    $('#demo').mobiscroll().calendar({
        rtl: true
    });

    $('#myform').mobiscroll().form({
        rtl: true
    });

});
<div id="myform">
    <div class="mbsc-align-center">
        <div class="mbsc-note mbsc-note-primary">Use RTL with locale settings where applicable or manually enable it.</div>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">RTL enabled by default</div>
        <label>
            Arabic
            <input id="arabic" placeholder="Please Select..." />
        </label>
        <label>
            Hebrew
            <input id="hebrew" placeholder="Please Select..." />
        </label>
        <label>
            Farsi
            <input id="farsi" placeholder="Please Select..." />
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Manually set RTL</div>
        <label>
            RTL
            <input id="demo" placeholder="Please Select..." />
        </label>
    </div>
</div>

Calendar - Localization

Change demo
Localization

The components are fully localized. In case of the calendar 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: '',
    display: 'bubble'
};

$(function () {

    $('#demo-english').mobiscroll().calendar({
        lang: 'en'
    });

    $('#demo-arabic').mobiscroll().calendar({
        lang: 'ar'
    });

    $('#demo-bulgarian').mobiscroll().calendar({
        lang: 'bg'
    });

    $('#demo-catala').mobiscroll().calendar({
        lang: 'ca'
    });

    $('#demo-cestina').mobiscroll().calendar({
        lang: 'cs'
    });

    $('#demo-chinese').mobiscroll().calendar({
        lang: 'zh'
    });

    $('#demo-croatian').mobiscroll().calendar({
        lang: 'hr'
    });

    $('#demo-dansk').mobiscroll().calendar({
        lang: 'da'
    });

    $('#demo-deutsch').mobiscroll().calendar({
        lang: 'de'
    });

    $('#demo-english-uk').mobiscroll().calendar({
        lang: 'en-UK'
    });

    $('#demo-espanol').mobiscroll().calendar({
        lang: 'es'
    });

    $('#demo-francais').mobiscroll().calendar({
        lang: 'fr'
    });

    $('#demo-greek').mobiscroll().calendar({
        lang: 'el'
    });

    $('#demo-hindi').mobiscroll().calendar({
        lang: 'hi'
    });

    $('#demo-italiano').mobiscroll().calendar({
        lang: 'it'
    });

    $('#demo-japanese').mobiscroll().calendar({
        lang: 'ja'
    });

    $('#demo-korean').mobiscroll().calendar({
        lang: 'ko'
    });

    $('#demo-lietuviu').mobiscroll().calendar({
        lang: 'lt'
    });

    $('#demo-magyar').mobiscroll().calendar({
        lang: 'hu'
    });

    $('#demo-nederlands').mobiscroll().calendar({
        lang: 'nl'
    });

    $('#demo-norsk').mobiscroll().calendar({
        lang: 'no'
    });

    $('#demo-polski').mobiscroll().calendar({
        lang: 'pl'
    });

    $('#demo-portugues').mobiscroll().calendar({
        lang: 'pt-PT'
    });

    $('#demo-brasileiro').mobiscroll().calendar({
        lang: 'pt-BR'
    });

    $('#demo-romana').mobiscroll().calendar({
        lang: 'ro'
    });

    $('#demo-serbian').mobiscroll().calendar({
        lang: 'sr'
    });

    $('#demo-slovencina').mobiscroll().calendar({
        lang: 'sk'
    });

    $('#demo-suomi').mobiscroll().calendar({
        lang: 'fi'
    });

    $('#demo-svenska').mobiscroll().calendar({
        lang: 'sv'
    });

    $('#demo-thai').mobiscroll().calendar({
        lang: 'th'
    });

    $('#demo-turkce').mobiscroll().calendar({
        lang: 'tr'
    });

    $('#demo-ukrainian').mobiscroll().calendar({
        lang: 'ua'
    });

    $('#demo-vietnamese').mobiscroll().calendar({
        lang: 'vi'
    });

    $('#demo-russian').mobiscroll().calendar({
        lang: 'ru'
    });

    $('#demo-russian-ua').mobiscroll().calendar({
        lang: 'ru-UA'
    });

    $('#demo-hebrew').mobiscroll().calendar({
        lang: 'he'
    });

    $('#demo-farsi').mobiscroll().calendar({
        lang: 'fa'
    });

    $('#demo-localization-form').mobiscroll().form({
        inputStyle: 'box'
    });

});
<div style="max-width:1200px;margin:0 auto;" mbsc-page>    <div id="demo-localization-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 id="demo-english" 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 id="demo-arabic" 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 id="demo-bulgarian" 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 id="demo-catala" 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 id="demo-cestina" 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 id="demo-chinese" 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 id="demo-croatian" 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 id="demo-dansk" 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 id="demo-deutsch" 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 id="demo-english-uk" 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 id="demo-espanol" 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 id="demo-francais" 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 id="demo-greek" 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 id="demo-hindi" 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 id="demo-italiano" 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 id="demo-japanese" 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 id="demo-korean" 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 id="demo-lietuviu" 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 id="demo-magyar" 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 id="demo-nederlands" 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 id="demo-norsk" 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 id="demo-polski" 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 id="demo-portugues" 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 id="demo-brasileiro" 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 id="demo-romana" 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 id="demo-serbian" 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 id="demo-slovencina" 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 id="demo-suomi" 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 id="demo-svenska" 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 id="demo-thai" 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 id="demo-turkce" 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 id="demo-ukrainian" 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 id="demo-vietnamese" 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 id="demo-russian" 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 id="demo-russian-ua" 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 id="demo-hebrew" 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 id="demo-farsi" placeholder="Please Select..." />
                    </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%;
}

Calendar - Event hooks

Change demo
Event hooks

The calendar 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: 
$(function () {

    $('#demo').mobiscroll().calendar({
        theme: '',
        lang: '',
        controls: ['calendar', 'time'],
        onInit: function (event, inst) {
            // Your custom event handler goes here
        },
        onMarkupReady: function (event, inst) {
            // Your custom event handler goes here
        },
        onBeforeShow: function (event, inst) {
            // Your custom event handler goes here
        },
        onPosition: function (event, inst) {
            // Your custom event handler goes here
        },
        onShow: function (event, inst) {
            // Your custom event handler goes here
        },
        onSet: function (event, inst) {
            // Your custom event handler goes here
        },
        onItemTap: function (event, inst) {
            // Your custom event handler goes here
        },
        onDestroy: function (event, inst) {
            // Your custom event handler goes here
        },
        onClose: function (event, inst) {
            // Your custom event handler goes here
        },
        onChange: function (event, inst) {
            // Your custom event handler goes here
        },
        onCancel: function (event, inst) {
            // Your custom event handler goes here
        },
        onBeforeClose: function (event, inst) {
            // Your custom event handler goes here
        },
        onClear: function (event, inst) {
            // Your custom event handler goes here
        },
        onDayChange: function (event, inst) {
            // Your custom event handler goes here
        },
        onPageChange: function (event, inst) {
            // Your custom event handler goes here
        },
        onPageLoaded: function (event, inst) {
            // Your custom event handler goes here
        },
        onPageLoading: function (event, inst) {
            // Your custom event handler goes here
        },
        onSetDate: function (event, inst) {
            // Your custom event handler goes here
        },
        onTabChange: function (event, inst) {
            // Your custom event handler goes here
        }
    });

    $('#show').off().click(function () {
        $('#demo').mobiscroll('show');
        return false;
    });

    $('#clear').off().click(function () {
        $('#demo').mobiscroll('clear');
        return false;
    });
});
<div mbsc-form>
    <div class="mbsc-form-group">
        <label>
            Calendar
            <input id="demo" data-label-style="stacked" data-input-style="box" placeholder="Please Select..." />
        </label>
        <div class="mbsc-btn-group">
            <button id="clear">Clear</button>
            <button id="show">Show</button>
        </div>
    </div>
</div>

Calendar - Theming capabilities

Change demo
Theming capabilities

The look and feel of the calendar can be deeply customized. 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.
  • 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 = {
    theme: '',
    lang: ''
};

$(function () {

    $('#demo-ios').mobiscroll().calendar({
        theme: 'ios',
        display: 'center',
        touchUi: false
    });

    $('#demo-ios-dark').mobiscroll().calendar({
        theme: 'ios-dark',
        display: 'center',
        touchUi: false
    });

    $('#demo-ios-custom').mobiscroll().calendar({
        theme: 'ios-gray',
        display: 'center',
        touchUi: false
    });

    $('#demo-material').mobiscroll().calendar({
        theme: 'material',
        display: 'center',
        touchUi: false
    });

    $('#demo-material-dark').mobiscroll().calendar({
        theme: 'material-dark',
        display: 'center',
        touchUi: false
    });

    $('#demo-material-custom').mobiscroll().calendar({
        theme: 'material-indigo',
        display: 'center',
        touchUi: false
    });

    $('#demo-windows').mobiscroll().calendar({
        theme: 'windows',
        display: 'center',
        touchUi: false
    });

    $('#demo-windows-dark').mobiscroll().calendar({
        theme: 'windows-dark',
        display: 'center',
        touchUi: false
    });

    $('#demo-windows-custom').mobiscroll().calendar({
        theme: 'windows-yellow',
        display: 'center',
        touchUi: false
    });

    $('#demo-mobiscroll').mobiscroll().calendar({
        theme: 'mobiscroll',
        display: 'center',
        touchUi: false
    });

    $('#demo-mobiscroll-dark').mobiscroll().calendar({
        theme: 'mobiscroll-dark',
        display: 'center',
        touchUi: false
    });

    $('#demo-mobiscroll-custom').mobiscroll().calendar({
        theme: 'mobiscroll-lime',
        display: 'center',
        touchUi: false
    });

});
<div style="max-width:1000px;margin:0 auto;" mbsc-page>    <div mbsc-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 id="demo-ios" placeholder="Please Select..." />
                    </label>
                        <label>
                        Dark
                        <input id="demo-ios-dark" placeholder="Please Select..." />
                    </label>
                        <label>
                        Custom
                        <input id="demo-ios-custom" 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 id="demo-material" placeholder="Please Select..." />
                    </label>
                        <label>
                        Dark
                        <input id="demo-material-dark" placeholder="Please Select..." />
                    </label>
                        <label>
                        Custom
                        <input id="demo-material-custom" 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 id="demo-windows" placeholder="Please Select..." />
                    </label>
                        <label>
                        Dark
                        <input id="demo-windows-dark" placeholder="Please Select..." />
                    </label>
                        <label>
                        Custom
                        <input id="demo-windows-custom" 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 id="demo-mobiscroll" placeholder="Please Select..." />
                    </label>
                        <label>
                        Dark
                        <input id="demo-mobiscroll-dark" placeholder="Please Select..." />
                    </label>
                        <label>
                        Custom
                        <input id="demo-mobiscroll-custom" placeholder="Please Select..." />
                    </label>
                    </div>
                </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 JQuery $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 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 JQuery $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 2/4/5/6/7 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 2/4/5/6/7 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 or Ionic 2/3/4.

Use it when you are building your app or website with React.

Do you need additional support seats?

The framework license comes with one support seat. ( +$50/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

Customize & try demos locally
You can download and use Mobiscroll for Free

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
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. HTML goes into the markup, TS into Typescript.

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

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

The demo is using an in-browser TypeScript transpiler app as its base. Extract the zip file and open the index.html on your local dev server.

You can also 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. 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 26
Cards 14
Color 10
Date & Time 19
Event Calendar 20
Forms 9
Grid layout 7
Image 7
Inputs & fields 6
Listview 17
Measurement 10
Navigation 8
Number 8
Numpad 13
Option List 4
Popup 10
Range 18
Scroller 7
Scrollview 5
Select 16
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