Calendar for React

Learn more

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

class App extends React.Component {
    render () {
        return (
            <mobiscroll.Form inputStyle="box">
                <div className="mbsc-grid mbsc-form-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <label>
        					    Mobile
                                <mobiscroll.Calendar
                                    display="bubble"
                                    placeholder="Please Select..."
                               />
                            </label>
                        </div>
    					<div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <label>
        					    Desktop
                                <mobiscroll.Calendar
                                    display="bubble"
                                    touchUi={false}
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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'
};

class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            val: new Date()
        };
    }
    
    show = () => {
        this.external.instance.show();
    }
    
    setExternal = (comp) => {
        this.external = comp;
    }
    render () {
        return (
            <div>
                <mobiscroll.Form inputStyle="box">
                    <div className="mbsc-grid mbsc-form-grid">
                        <mobiscroll.FormGroup>
                            <mobiscroll.FormGroupTitle>Using the Calendar with Mobiscroll form fields</mobiscroll.FormGroupTitle>
                            <div className="mbsc-row">
                                <div className="mbsc-col-sm-12 mbsc-col-md-6">
                					<label>
                					    Date
                                        <mobiscroll.Calendar placeholder="Please Select..." />
                                    </label>
                                </div>
                                <div className="mbsc-col-sm-12 mbsc-col-md-6">
                					<label>
                					    Date & Time
                                        <mobiscroll.Calendar controls={['calendar', 'time']} placeholder="Please Select..." />
                                    </label>
                                </div>
                            </div>
                        </mobiscroll.FormGroup>
                    </div>
                </mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <label htmlFor="demo-non-form">Date</label>
                            <mobiscroll.Calendar>
                                <input className="demo-non-form" placeholder="Please Select..." />
                            </mobiscroll.Calendar>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <div className="mbsc-row mbsc-align-items-end">
                                <div className="mbsc-col-9">
                                    <label htmlFor="demo-external">Show on button click only</label>
                                    <mobiscroll.Calendar
                                        ref={this.setExternal}
                                        value={this.state.val}
                                        showOnTap={false}
                                        showOnFocus={false}
                                        controls={['calendar', 'time']}
                                    >
                                        <input id="demo-external" className="demo-non-form" />
                                    </mobiscroll.Calendar>
                                </div>
                                <div className="mbsc-col-3 external-container">
                                    <button onClick={this.show} className="external-button">Show</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        );
    }    
}


<div id="content"></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: ''
};

class App extends React.Component {
    constructor(props) {
        super(props);
        
        this.state = {
            date: null,
            iso: null,
            locale: null,
            moment: null,
            retDate: '',
            retISO: '',
            retLocale: '',
            retMoment: ''
        };
    }
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Working with Js Date Objects</mobiscroll.FormGroupTitle>
					<div className="mbsc-btn-group-block">
                        <mobiscroll.Button onClick={this.onClickDate}>Set: Sun Dec 17 1995 03:24:00 GMT</mobiscroll.Button>
                    </div>
                    <div>
                        <label>
                            Date object
                            <mobiscroll.Calendar
                                onSet={this.onSetDate}
                                value={this.state.date}
                            />
                        </label>
                    </div>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup className="mbsc-padding">
				    Return value: {this.state.retDate}
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Working with Date strings</mobiscroll.FormGroupTitle>
					<div className="mbsc-btn-group-block">
                        <mobiscroll.Button onClick={this.onClickISO}>Set: 2008-09-15T15:53:00</mobiscroll.Button>
                    </div>
                    <div>
                        <label>
                            ISO string
                            <mobiscroll.Calendar
                                returnFormat="iso8601"
                                onSet={this.onSetISO}
                                value={this.state.iso}
                            />
                        </label>
                    </div>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup className="mbsc-padding">
				    Return value: {this.state.retISO}
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Working with Localized Strings</mobiscroll.FormGroupTitle>
					<div className="mbsc-btn-group-block">
                        <mobiscroll.Button onClick={this.onClickLocale}>Set: 04/25/2010 8:15 AM</mobiscroll.Button>
                    </div>
                    <div>
                        <label>
                            Local format
                            <mobiscroll.Calendar
                                returnFormat="locale"
                                onSet={this.onSetLocale}
                                value={this.state.locale}
                            />
                        </label>
                    </div>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup className="mbsc-padding">
				    Return value: {this.state.retLocale}
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Working with Moment JS Objects</mobiscroll.FormGroupTitle>
					<div className="mbsc-btn-group-block">
                        <mobiscroll.Button onClick={this.onClickMoment}>Set: 2018-04-27T12:15:00+03:00</mobiscroll.Button>
                    </div>
                    <div>
                        <label>
                            Moment JS
                            <mobiscroll.Calendar
                                theme=""
                                lang=""
                                returnFormat="moment"
                                onSet={this.onSetMoment}
                                value={this.state.moment}
                            />
                        </label>
                    </div>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup className="mbsc-padding">
				    Return value: {this.state.retMoment}
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    };
    
    setDate(date) {
        this.setState({
            date: date,
            retDate: date.toString()
        });
    }
    
    onClickDate = () => {
        this.setDate(new Date(1995, 11, 17, 15, 24));
    };

    onSetDate = (event, inst) => {
        this.setDate(inst.getVal());
    };
    
    setISO(iso) {
        this.setState({
            iso: iso,
            retISO: iso
        });
    }
    
    onClickISO = () => {
        this.setISO('2008-09-15T15:53:00');
    };

    onSetISO = (event, inst) => {
        this.setISO(inst.getVal());
    };
    
    setLocale(locale) {
        this.setState({
            locale: locale,
            retLocale: locale
        });
    }
    
    onClickLocale = () => {
        this.setLocale('04/25/2010 8:15 AM');
    };

    onSetLocale = (event, inst) => {
        this.setLocale(inst.getVal());
    };
    
    setMoment(moment) {
        this.setState({
            moment: moment,
            retMoment: moment.toString()
        });
    }
    
    onClickMoment = () => {
        // make sure that moment js is loaded
        this.setMoment(moment([2018, 3, 27, 12, 15]));
    };

    onSetMoment = (event, inst) => {
        this.setMoment(inst.getVal());
    };
    
}

<div id="content"></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 →
mobiscroll.settings = {
    lang: '',
    theme: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Try different display modes</mobiscroll.FormGroupTitle>
                    <label>
                        Bottom
                        <mobiscroll.Calendar
                            display="bottom"
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Top
                        <mobiscroll.Calendar
                            display="top"
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Center
                        <mobiscroll.Calendar
                            display="center"
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Bubble
                        <mobiscroll.Calendar
                            display="bubble"
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Fullscreen
                        <mobiscroll.Calendar
                            display="center"
                            layout="liquid"
                            placeholder="Please Select..."
                        />
                    </label>
                </mobiscroll.FormGroup>    
                <mobiscroll.FormGroup className="mbsc-padding">
                    <p className="mbsc-thin">With inline display you can embed the calendar component in almost any markup or form.</p>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
                    <mobiscroll.FormGroupTitle>Embedded calendar</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        display="inline"
                    />
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row mbsc-justify-content-center">
                        <div className="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>Pop-up positioning</mobiscroll.FormGroupTitle>
                                <label>
                                    Top
                                    <mobiscroll.Calendar
                                        touchUi={false}
                                        display="top"
                                        placeholder="Please select..."
                                    />
                                </label>
                                <label>
                                    Bottom
                                    <mobiscroll.Calendar
                                        touchUi={false}
                                        display="bottom"
                                        placeholder="Please select..."
                                    />
                                </label>
                                <label>
                                    Anchored
                                    <mobiscroll.Calendar
                                        touchUi={false}
                                        placeholder="Please select..."
                                    />
                                </label>
                                <label>
                                    Center
                                    <mobiscroll.Calendar
                                        touchUi={false}
                                        display="center"
                                        placeholder="Please select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                    <div className="mbsc-row mbsc-justify-content-center">
                        <div className="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>Basic usage</mobiscroll.FormGroupTitle>
                                <label>
                                    Date & Time
                                    <mobiscroll.Calendar
                                        touchUi={false}
                                        controls={['calendar', 'time']}
                                        placeholder="Please select..."
                                    />
                                </label>
                                <label>
                                    Date
                                    <mobiscroll.Calendar
                                        touchUi={false}
                                        controls={['calendar']}
                                        placeholder="Please select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                    <div className="mbsc-row mbsc-justify-content-center">
                        <div className="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>With buttons</mobiscroll.FormGroupTitle>
                                <label>
                                    Set button
                                    <mobiscroll.Calendar
                                        display="center"
                                        touchUi={false}
                                        buttons={['set']}
                                        placeholder="Please select..."
                                    />
                                </label>
                                <label>
                                    Set/Cancel
                                    <mobiscroll.Calendar
                                        display="center"
                                        touchUi={false}
                                        buttons={['set', 'cancel']}
                                        placeholder="Please select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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: ''
};

const responsiveDate = {
    xsmall: {
        controls: ['date']
    },
    small: {
        controls: ['calendar'],
        display: 'bubble'
    },
    medium: {
        controls: ['calendar'],
        months: 2,
        yearChange: false,
        touchUi: false
    }
};

const responsiveDisplay = {
    small: {
        controls: ['calendar'],
        display: 'center'
    },
    medium: {
        display: 'bubble',
        touchUi: false
    }
};

class App extends React.Component {
    render () {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row mbsc-justify-content-center">
                        <div className="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>Basic usage</mobiscroll.FormGroupTitle>
                                <label>
            					    Date
                                    <mobiscroll.Calendar
                                        responsive={responsiveDate}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
                                    Display
                                    <mobiscroll.Calendar
                                        responsive={responsiveDisplay}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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'
};

class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            val: new Date()
        };
    }
    
    show = () => {
        this.external.instance.show();
    }
    
    setExternal = (comp) => {
        this.external = comp;
    }

    render () {
        return (
            <div>
                <mobiscroll.Form inputStyle="box" labelStyle="stacked">
                    <div className="mbsc-grid mbsc-form-grid">
                        <div className="mbsc-row">
                            <div className="mbsc-col-sm-12 mbsc-col-md-4">
            					<label>
            					    Mobile
                                    <mobiscroll.Calendar value={this.state.val} />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-4">
            					<label>
            					    Desktop
                                    <mobiscroll.Calendar
                                        value={this.state.val}
                                        touchUi={false}
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-4">
            					<label>
            					    Header text
                                    <mobiscroll.Calendar
                                        value={this.state.val}
                                        headerText="{value}"
                                    />
                                </label>
                            </div>
                        </div>
                    </div>
                </mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <label htmlFor="demo-non-form">Date</label>
                            <mobiscroll.Calendar value={this.state.val}>
                                <input className="demo-non-form" />
                            </mobiscroll.Calendar>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <div className="mbsc-row mbsc-align-items-end">
                                <div className="mbsc-col-9">
                                    <label htmlFor="demo-external">Show on button click only</label>
                                    <mobiscroll.Calendar
                                        ref={this.setExternal}
                                        value={this.state.val}
                                        showOnTap={false}
                                        showOnFocus={false}
                                    >
                                        <input id="demo-external" className="demo-non-form" />
                                    </mobiscroll.Calendar>
                                </div>
                                <div className="mbsc-col-3 external-container">
                                    <button onClick={this.show} className="external-button">Show</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        );
    }    
}


<div id="content"></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 & 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'
};

class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            val: new Date()
        };
    }
    
    show = () => {
        this.external.instance.show();
    }
    
    setExternal = (comp) => {
        this.external = comp;
    }
    
    render () {
        return (
            <div>
                <mobiscroll.Form inputStyle="box" labelStyle="stacked">
                    <div className="mbsc-grid mbsc-form-grid">
                        <div className="mbsc-row">
                            <div className="mbsc-col-sm-12 mbsc-col-md-4">
            					<label>
            					    Mobile
                                    <mobiscroll.Calendar controls={['calendar', 'time']} value={this.state.val} />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-4">
            					<label>
            					    Desktop
                                    <mobiscroll.Calendar
                                    controls={['calendar', 'time']}
                                        value={this.state.val}
                                        touchUi={false}
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-4">
            					<label>
            					    Header text
                                    <mobiscroll.Calendar
                                    controls={['calendar', 'time']}
                                        value={this.state.val}
                                        headerText="{value}"
                                    />
                                </label>
                            </div>
                        </div>
                    </div>
                </mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <label htmlFor="demo-non-form">Date</label>
                            <mobiscroll.Calendar controls={['calendar', 'time']} value={this.state.val}>
                                <input className="demo-non-form" />
                            </mobiscroll.Calendar>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <div className="mbsc-row mbsc-align-items-end">
                                <div className="mbsc-col-9">
                                    <label htmlFor="demo-external">Show on button click only</label>
                                    <mobiscroll.Calendar
                                        controls={['calendar', 'time']}
                                        ref={this.setExternal}
                                        value={this.state.val}
                                        showOnTap={false}
                                        showOnFocus={false}
                                    >
                                        <input id="demo-external" className="demo-non-form" />
                                    </mobiscroll.Calendar>
                                </div>
                                <div className="mbsc-col-3 external-container">
                                    <button onClick={this.show} className="external-button">Show</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        );
    }    
}


<div id="content"></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 - 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: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Multi-day</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    select="multiple"
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Max days</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    display="inline"
                                    select={5}
                                    headerText="Pick up to 5 days"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Counter</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    select="multiple"
                                    counter={true}
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }   
}


<div id="content"></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: ''
};

class App extends React.Component {
    render() {
        let fromMonday = [];
        let fromSaturday = [];
        let twoWeeks = [];
        
        for (let i = 0; i < 7; i++) {
            fromMonday.push(new Date(2018, 0, 8 + i));
            fromSaturday.push(new Date(2018, 0, 6 + i));
        }
        
        for (let j = 0; j < 14; j++) {
            twoWeeks.push(new Date(2018, 0, 8 + j));
        }
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Mon-Sun</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    selectType="week"
                                    defaultValue={fromMonday}
                                    firstSelectDay={1}
                                    firstDay={1}
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Sat-Fri</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    selectType="week"
                                    defaultValue={fromSaturday}
                                    firstSelectDay={6}
                                    firstDay={1}
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Multiple</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    selectType="week"
                                    defaultValue={twoWeeks}
                                    firstSelectDay={1}
                                    firstDay={1}
                                    select="multiple"
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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 →
mobiscroll.settings = {
    lang: '',
    theme: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
                    <mobiscroll.FormGroupTitle>One week view</mobiscroll.FormGroupTitle>
                    <label>
                       <mobiscroll.Calendar
                            weeks={1}
                            display="inline"
                            placeholder="Please Select..."
                        >
                            <input type="hidden" />
                        </mobiscroll.Calendar>
                    </label>
                </mobiscroll.FormGroup>
                
                <mobiscroll.FormGroup>
                    <mobiscroll.FormGroupTitle>Two week view</mobiscroll.FormGroupTitle>
                    <label>
                       <mobiscroll.Calendar
                            weeks={2}
                            display="inline"
                            placeholder="Please Select..."
                        >
                            <input type="hidden" />
                        </mobiscroll.Calendar>
                    </label>
                </mobiscroll.FormGroup>
                
                <mobiscroll.FormGroup>
                    <mobiscroll.FormGroupTitle>Three week view</mobiscroll.FormGroupTitle>
                    <label>
                       <mobiscroll.Calendar
                            weeks={3}
                            display="inline"
                            placeholder="Please Select..."
                        >
                            <input type="hidden" />
                        </mobiscroll.Calendar>
                    </label>
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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: ''
};

class App extends React.Component {
     constructor(props) {
        super(props);

        this.state = {
            view: 'month',
            weeks: 6
        };
    }
    changeView = (event) => {
        let weekNr = 0;
        switch (event.target.value) {
            case 'month':
                weekNr = 6;
                break;
            case 'week':
                weekNr = 1;
                break;
        }
        this.setState({
            view: event.target.value,
            weeks: weekNr
        });
    }
    render () {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
                    <mobiscroll.FormGroupTitle>Month view and week view</mobiscroll.FormGroupTitle>
                    <mobiscroll.Segmented name="view" value="month" checked={this.state.view === 'month'} onChange={this.changeView}>
                        Month
                    </mobiscroll.Segmented>
                    <mobiscroll.Segmented name="view" value="week" checked={this.state.view === 'week'} onChange={this.changeView}>
                        Week
                    </mobiscroll.Segmented>
                    <label>
					    Date
                        <mobiscroll.Calendar
                            display="inline"
                            weeks={this.state.weeks}
                        />
                    </label>
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></div>

Calendar - Multi month view

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

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form inputStyle="box" labelStyle="inline">
                <div className="mbsc-grid">
                    <mobiscroll.FormGroup>
                        <mobiscroll.FormGroupTitle>Popover calendar</mobiscroll.FormGroupTitle>
                        <div className="mbsc-row mbsc-form-grid">
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Two months
                                    <mobiscroll.Calendar
                                        display="bubble"
                                        months={2}
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Three months
                                    <mobiscroll.Calendar
                                        display="bubble"
                                        months={3}
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Four months
                                    <mobiscroll.Calendar
                                        display="bubble"
                                        months={4}
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Auto
                                    <mobiscroll.Calendar
                                        display="bubble"
                                        months="auto"
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                        </div>
                    </mobiscroll.FormGroup>
                    <mobiscroll.FormGroup>
                        <mobiscroll.FormGroupTitle>Center positioned calendar</mobiscroll.FormGroupTitle>
                        <div className="mbsc-row mbsc-form-grid">
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Two months
                                    <mobiscroll.Calendar
                                        display="center"
                                        months={2}
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Three months
                                    <mobiscroll.Calendar
                                        display="center"
                                        months={3}
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Four months
                                    <mobiscroll.Calendar
                                        display="center"
                                        months={4}
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
                                    Auto
                                    <mobiscroll.Calendar
                                        display="center"
                                        months="auto"
                                        yearChange={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </div>
                        </div>
                    </mobiscroll.FormGroup>
                </div>
            </mobiscroll.Form>
        );
    }   
}


<div id="content"></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'
};

class App extends React.Component {
    render() {
        const now = new Date();
        const yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
        const tomorrow = new Date(new Date().setDate(new Date().getDate() + 1));
        const nextMonths = new Date(now.getFullYear(), now.getMonth() + 6, now.getDate());
    
        return (
            <mobiscroll.Form inputStyle="box" labelStyle="stacked">
                <div className="mbsc-grid">
                    <mobiscroll.FormGroup>
    					<mobiscroll.FormGroupTitle>Pick a date</mobiscroll.FormGroupTitle>
    					<div className="mbsc-row mbsc-form-grid">
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
            					<label>
            					    Next 6 months
                                    <mobiscroll.Calendar
                                        headerText="Select your next visit"
                                        max={nextMonths}
                                        min={tomorrow}
                                        value={now}
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
            					<label>
            					    Future dates
                                    <mobiscroll.Calendar
                                        min={tomorrow}
                                        value={now}
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
                                <label>
            					    Past dates
                                    <mobiscroll.Calendar
                                        max={yesterday}
                                        value={now}
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6 mbsc-col-xl-3">
            					<label>
            					    With time
                                    <mobiscroll.Calendar
                                        controls={['calendar', 'time']}
                                        invalid={[
                                            { start: '00:00', end: '08:59' },
                                            { start: '17:01', end: '23:59' }
                                        ]}
                                        value={now}
                                    />
                                </label>
                            </div>
                        </div>
                    </mobiscroll.FormGroup>
                    <mobiscroll.FormGroup>
    					<mobiscroll.FormGroupTitle>Date formats</mobiscroll.FormGroupTitle>
    					<div className="mbsc-row mbsc-form-grid">
                            <div className="mbsc-col-sm-12 mbsc-col-md-6">
            					<label>
            					    String
                                    <mobiscroll.Calendar
                                        max="2018-08-31T00:00"
                                        min="08/01/2018"
                                        value={now}
                                    />
                                </label>
                            </div>
                            <div className="mbsc-col-sm-12 mbsc-col-md-6">
                                <label>
            					    Moment JS
                                    <mobiscroll.Calendar
                                        max={moment([2018, 8, 30])}
                                        min={moment([2018, 8, 1])}
                                        value={now}
                                    />
                                </label>
                            </div>
                        </div>
                    </mobiscroll.FormGroup>
                </div>
            </mobiscroll.Form>
        );
    }    
}


<div id="content"></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'
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Invalidating exact dates</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        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}
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Invalidating recurring dates</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        invalid={[
                            '12/24',
                            '12/25',
                            '12/26',
                            '12/31'
                        ]}
                        defaultValue={new Date(2018, 11, 10)}
                        weeks={1}
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Invalidating Weekdays</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        invalid={['w0', 'w6']}
                        weeks={1}
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Invalidating date ranges</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        invalid={[
                            { start: new Date(2018, 11, 21), end: new Date(2018, 11, 31) }
                        ]}
                        defaultValue={new Date(2018, 11, 10)}
                        weeks={1}
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Overriding inside invalid ranges</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        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}
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>String</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        defaultValue="2018-07-25T00:00"
                        invalid={[
                            '2018-07-10T00:00',
                            '2018-07-16T00:00',
                            '07/19/2018',
                            '07/27/2018'
                        ]}
                        weeks={1}
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Moment JS</mobiscroll.FormGroupTitle>
                    <mobiscroll.Calendar
                        type="hidden"
                        // make sure that moment js is loaded
                        defaultValue={moment([2018, 8, 17])}
                        invalid={[
                            moment([2018, 8, 11]),
                            moment([2018, 8, 20])
                        ]}
                        weeks={1}
                    />
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></div>

Calendar - Booking

Change demo
Booking
Advanced React Calendar booking demo with unavailable, disabled days and free selection for the next 6 months. For React.
// concat

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

const now = new Date();
const min = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const max = new Date(now.getFullYear(), now.getMonth() + 6, now.getDate());

class App extends React.Component {
    constructor(props) {
        super(props);
        
        let booked = [];
        let invalid = ['w1'];
        const firstMonth = this.generateMonthEvents(now.getFullYear(), now.getMonth());

        booked = firstMonth.labels;
        invalid = invalid.concat(firstMonth.invalid);
        
        this.state = {
            labels: booked,
            invalid: invalid
        };
    }

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

    generateMonthEvents(year, month) {
        let isDisabled = false;
        let tempDay = null;
        let invalid = [];
        let labels = [];
        const disabledDays = [this.getRandomDay(), this.getRandomDay(), this.getRandomDay(), this.getRandomDay()];

        for (let 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
        };
    }
    onPageLoading = (event, inst) => {
        let newItems = [];
        const year = event.firstDay.getFullYear();
        const month = event.firstDay.getMonth();
        const isEventsLoaded = (this.state.labels).filter((v) => {
            return v.d.getMonth() === month + 1;
        }).length;

        if (!isEventsLoaded) {
            newItems = this.generateMonthEvents(year, month + 1);
            
            this.setState(state => ({
                labels: [...state.labels, ...newItems.labels],
                invalid: [...state.invalid, ...newItems.invalid]
            }));
        }
    }
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.Calendar 
                    ref="calendar" 
                    display="inline"
                    type="hidden"
                    controls={['calendar']}
                    labels={this.state.labels}
                    invalid={this.state.invalid}
                    min={min}
                    max={max}
                    onPageLoading={this.onPageLoading}
                />
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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 calendar 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 onPageChange event.

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

class App extends React.Component {
    constructor(props) {
        super(props);

        const now = new Date();
        this.state = {
            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' }
            ],
            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' }
            ],
            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' }
            ]
        };
    }
    
    render() {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Marked days</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    marked={this.state.marked}
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Colored days</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    colors={this.state.colors}
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Labels</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    labels={this.state.labels}
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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 →
class App extends React.Component {
   constructor(props) {
        super(props);
        const now = new Date();
        
        this.state = {
            items: [{
                id: 1,
                text: 'Town council meeting'
            }, {
                id: 2,
                text: 'Town hall closed'
            }, {
                id: 3,
                text: 'Garbage collection'
            }, {
                id: 4,
                text: 'Special events'
            }, {
                id: 5,
                text: 'National holidays'
            }],
            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)'
            }]
        }
    }
    
    render() {
        return (
            <div className="md-marked">
                <mobiscroll.Calendar 
                    className="md-i-hide"
                    theme=""
                    lang=""
                    display="inline"
                    layout="liquid"
                    markedDisplay="bottom"
                    marked={this.state.marked}
                    placeholder="Please Select..."
                />
                <mobiscroll.Listview
                        theme=""
                        lang=""
                        itemType={ListItem} 
                        data={this.state.items}
                        swipe={false}
                    />
            </div>
        );
    }    
}

class ListItem extends React.Component {
    render() {
         return <li><span className={"md-marked-points md-points-type" + this.props.item.id}></span> {this.props.item.text}</li>;
    }
}

<div id="content"></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: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Week numbers go on for a full year</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    weekCounter="year"
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Week numbers restart for every month</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    weekCounter="month"
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Horizontal navigation</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    calendarScroll="horizontal"
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Vertical navigation</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    calendarScroll="vertical"
                                    display="inline"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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 = {
    lang: '',
    theme: ''
};

const autoBtn = [{
    text: 'Close',
    handler: 'cancel'
}];

const customBtn = [
    {
        text: 'Custom',
        handler: (event, inst) => {
            inst.setVal(new Date(2018, 0, 1), true, true, false, 1000);
        }
    },
    'set',
    'cancel'
];

class App extends React.Component {
    setValue = () => {
        this.date.instance.setVal(new Date(2018, 0, 2), true, true, false, 1000);
    }
    
    setToday = () => {
        this.date.instance.setVal(new Date(), true, true, false, 1000);
    }
    
    setDate = (comp) => {
        this.date = comp;
    }
    
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Controlling the default value</mobiscroll.FormGroupTitle>
                    <label>
                        Default
                        <mobiscroll.Calendar
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Custom default
                        <mobiscroll.Calendar
                            defaultValue={new Date(2018, 2, 2)}
                            placeholder="Please Select..."
                        />
                    </label>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Setting a custom value</mobiscroll.FormGroupTitle>
                    <div className="mbsc-btn-group-block">
                        <button type="button" onClick={this.setValue}>02-01-2018</button>
                        <button type="button" onClick={this.setToday}>Today</button>
                    </div>
                    <mobiscroll.Calendar
                        ref={this.setDate}
                        display="inline"
                        type="hidden"
                    />
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Buttons API</mobiscroll.FormGroupTitle>
                    <label>
                        Now
                        <mobiscroll.Calendar
                            buttons={['now', 'set', 'cancel']}
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Custom
                        <mobiscroll.Calendar
                            buttons={{customBtn}}
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Auto set
                        <mobiscroll.Calendar
                            buttons={autoBtn}
                            placeholder="Please Select..."
                        />
                    </label>
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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 = {
    lang: '',
    theme: ''
};

class App extends React.Component {
    constructor(props) {
        super(props);

        this.state = {
            val: new Date()
        };
    }
    
    render() {
        return (
            <mobiscroll.Form>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Date</mobiscroll.FormGroupTitle>
                    <label>
                        Default
                        <mobiscroll.Calendar
                            value={this.state.val}
                        />
                    </label>
                    <label>
                        Separator
                        <mobiscroll.Calendar
                            dateFormat="dd.mm.yy"
                            value={this.state.val}
                        />
                    </label>
                    <label>
                        Month name
                        <mobiscroll.Calendar
                            dateFormat="d MM yy"
                            value={this.state.val}
                        />
                    </label>
                    <label>
                        Day of week
                        <mobiscroll.Calendar
                            dateFormat="D d M, yy"
                            value={this.state.val}
                        />
                    </label>
                    <label>
                        ATOM
                        <mobiscroll.Calendar
                            dateFormat="yy-mm-dd"
                            value={this.state.val}
                        />
                    </label>
                    <label>
                        COOKIE
                        <mobiscroll.Calendar
                            dateFormat="D, dd M yy"
                            value={this.state.val}
                        />
                    </label>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
					<mobiscroll.FormGroupTitle>Date & Time</mobiscroll.FormGroupTitle>
                    <label>
                        Default
                        <mobiscroll.Calendar
                            controls={['calendar', 'time']}
                            value={this.state.val}
                        />
                    </label>
                    <label>
                        Day name
                        <mobiscroll.Calendar
                            controls={['calendar', 'time']}
                            dateFormat={'D d M, yy'}
                            timeFormat={'H:ii'}
                            value={this.state.val}
                        />
                    </label>
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }   
}

<div id="content"></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: ''
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form rtl={true}>
                <mobiscroll.FormGroup>
                <mobiscroll.FormGroupTitle>RTL enabled by default</mobiscroll.FormGroupTitle>
                    <label>
                        Arabic
                        <mobiscroll.Calendar
                            lang="ar"
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Hebrew
                        <mobiscroll.Calendar
                            lang="he"
                            placeholder="Please Select..."
                        />
                    </label>
                    <label>
                        Farsi
                        <mobiscroll.Calendar
                            lang="fa"
                            placeholder="Please Select..."
                        />
                    </label>
                </mobiscroll.FormGroup>
                <mobiscroll.FormGroup>
                    <mobiscroll.FormGroupTitle>Manually set RTL</mobiscroll.FormGroupTitle>
                    <label>
                        RTL
                        <mobiscroll.Calendar
                            rtl={true}
                            placeholder="Please Select..."
                        />
                    </label>
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></div>

Calendar - Calendar systems

Change demo
Calendar systems

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

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

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Gregorian calendar</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    display="inline"
                                    calendarSystem="gregorian"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Jalali calendar</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    display="inline"
                                    calendarSystem="jalali"
                                    lang="fa"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4">
                            <mobiscroll.FormGroup>
                                <mobiscroll.FormGroupTitle>Hijri calendar</mobiscroll.FormGroupTitle>
                                <mobiscroll.Calendar
                                    display="inline"
                                    calendarSystem="hijri"
                                    lang="ar"
                                    type="hidden"
                                />
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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'
};

class App extends React.Component {
    render() {
        return (
            <mobiscroll.Form inputStyle="box" className="md-localization">
                <div className="mbsc-grid mbsc-form-grid">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-en"></span>
                                English
                                <mobiscroll.Calendar
                                    lang="en"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ar"></span>
                                Arabic
                                <mobiscroll.Calendar
                                    lang="ar"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-bg"></span>
                                Bulgarian
                                <mobiscroll.Calendar
                                    lang="bg"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ca"></span>
                                Català
                                <mobiscroll.Calendar
                                    lang="ca"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-cs"></span>
                                Cestina
                                <mobiscroll.Calendar
                                    lang="cs"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-zh"></span>
                                Chinese
                                <mobiscroll.Calendar
                                    lang="zh"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-hr"></span>
                                Croatian
                                <mobiscroll.Calendar
                                    lang="hr"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-da"></span>
                                Dansk
                                <mobiscroll.Calendar
                                    lang="da"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-de"></span>
                                Deutsch
                                <mobiscroll.Calendar
                                    lang="de"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-en-UK"></span>
                                English (UK)
                                <mobiscroll.Calendar
                                    lang="en-UK"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-es"></span>
                                Español
                                <mobiscroll.Calendar
                                    lang="es"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-fr"></span>
                                Français
                                <mobiscroll.Calendar
                                    lang="fr"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-gr"></span>
                                Greek
                                <mobiscroll.Calendar
                                    lang="el"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-in"></span>
                                Hindi
                                <mobiscroll.Calendar
                                    lang="hi"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-it"></span>
                                Italiano
                                <mobiscroll.Calendar
                                    lang="it"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ja"></span>
                                Japanese
                                <mobiscroll.Calendar
                                    lang="ja"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-kr"></span>
                                Korean
                                <mobiscroll.Calendar
                                    lang="ko"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-lt"></span>
                                Lietuvių
                                <mobiscroll.Calendar
                                    lang="lt"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-hu"></span>
                                Magyar
                                <mobiscroll.Calendar
                                    lang="hu"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-nl"></span>
                                Nederlands
                                <mobiscroll.Calendar
                                    lang="nl"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-no"></span>
                                Norsk
                                <mobiscroll.Calendar
                                    lang="no"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-pl"></span>
                                Polski
                                <mobiscroll.Calendar
                                    lang="pl"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-pt-PT"></span>
                                Português Europeu
                                <mobiscroll.Calendar
                                    lang="pt-PT"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-pt-BR"></span>
                                Pt. Brasileiro
                                <mobiscroll.Calendar
                                    lang="pt-BR"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ro"></span>
                                Româna
                                <mobiscroll.Calendar
                                    lang="ro"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-sr"></span>
                                Serbian
                                <mobiscroll.Calendar
                                    lang="sr"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-sk"></span>
                                Slovencina
                                <mobiscroll.Calendar
                                    lang="sk"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-fi"></span>
                                Suomi
                                <mobiscroll.Calendar
                                    lang="fi"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-sv"></span>
                                Svenska
                                <mobiscroll.Calendar
                                    lang="sv"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-th"></span>
                                Thai
                                <mobiscroll.Calendar
                                    lang="th"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-tr"></span>
                                Türkçe
                                <mobiscroll.Calendar
                                    lang="tr"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ua"></span>
                                Ukrainian
                                <mobiscroll.Calendar
                                    lang="ua"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-vi"></span>
                                Vietnamese
                                <mobiscroll.Calendar
                                    lang="vi"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ru"></span>
                                Русский
                                <mobiscroll.Calendar
                                    lang="ru"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-ru-UA"></span>
                                Русский (UA)
                                <mobiscroll.Calendar
                                    lang="ru-UA"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-he"></span>
                                עברית
                                <mobiscroll.Calendar
                                    lang="he"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-4 mbsc-col-xl-3">
                            <label>
                                <span className="flag flag-fa"></span>
                                فارسی
                                <mobiscroll.Calendar
                                    lang="fa"
                                    placeholder="Please Select..."
                                />
                            </label>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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: 
class App extends React.Component {
    show = () => {
        this.cal.instance.show();
    }
    
    clear = () => {
        this.cal.instance.clear();
    }

    onInit = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onMarkupReady = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onBeforeShow = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onPosition = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onShow = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onSet = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onItemTap = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onDestroy = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onClose = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onChange = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onCancel = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onBeforeClose = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onClear = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onDayChange = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onPageChange = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onPageLoaded = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onPageLoading = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onSetDate = (event, inst) => {
        // Your custom event handler goes here
    }
    
    onTabChange = (event, inst) => {
        // Your custom event handler goes here
    }
    
    setRef = (comp) => {
        this.cal = comp;
    }
    
    render() {
        
        return (
           <mobiscroll.Form>
                <mobiscroll.FormGroup>
                    <mobiscroll.Calendar 
                        ref={this.setRef} 
                        theme="" 
                        lang=""
                        controls={['calendar', 'time']}
                        onInit={this.onInit}
                        onMarkupReady={this.onMarkupReady}
                        onBeforeShow={this.onBeforeShow}
                        onPosition={this.onPosition}
                        onShow={this.onShow}
                        onSet={this.onSet}
                        onItemTap={this.onItemTap}
                        onDestroy={this.onDestroy}
                        onClose={this.onClose}
                        onChange={this.onChange}
                        onCancel={this.onCancel}
                        onBeforeClose={this.onBeforeClose}
                        onClear={this.onClear}
                        onTabChange={this.onTabChange}
                        onSetDate={this.onSetDate}
                        onPageLoading={this.onPageLoading}
                        onPageLoaded={this.onPageLoaded}
                        onPageChange={this.onPageChange}
                        onDayChange={this.onDayChange}
                        placeholder="Please Select..."
                    >
                        <mobiscroll.Input inputStyle="box" labelStyle="stacked" placeholder="Please Select..." />
                    </mobiscroll.Calendar>
                    <div className="mbsc-btn-group">
                        <button type="button" onClick={this.clear}>Clear</button>
                        <button type="button" onClick={this.show}>Show</button>
                    </div>
                </mobiscroll.FormGroup>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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 = {
    lang: '',
    theme: ''
};

class App extends React.Component {
    render () {
        return (
            <mobiscroll.Form>
                <div className="mbsc-grid mbsc-grid-fixed">
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>iOS Theme</mobiscroll.FormGroupTitle>
                                <label>
            					    Light
                                    <mobiscroll.Calendar
                                        theme="ios"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Dark
                                    <mobiscroll.Calendar
                                        theme="ios-dark"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Custom
                                    <mobiscroll.Calendar
                                        theme="ios-gray"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>Material Theme</mobiscroll.FormGroupTitle>
                                <label>
            					    Light
                                    <mobiscroll.Calendar
                                        theme="material"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Dark
                                    <mobiscroll.Calendar
                                        theme="material-dark"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Custom
                                    <mobiscroll.Calendar
                                        theme="material-indigo"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                    <div className="mbsc-row">
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>Windows Theme</mobiscroll.FormGroupTitle>
                                <label>
            					    Light
                                    <mobiscroll.Calendar
                                        theme="windows"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Dark
                                    <mobiscroll.Calendar
                                        theme="windows-dark"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Custom
                                    <mobiscroll.Calendar
                                        theme="windows-yellow"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                        <div className="mbsc-col-sm-12 mbsc-col-md-6">
                            <mobiscroll.FormGroup inset>
                                <mobiscroll.FormGroupTitle>Mobiscroll Theme</mobiscroll.FormGroupTitle>
                                <label>
            					    Light
                                    <mobiscroll.Calendar
                                        theme="mobiscroll"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Dark
                                    <mobiscroll.Calendar
                                        theme="mobiscroll-dark"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                                <label>
            					    Custom
                                    <mobiscroll.Calendar
                                        theme="mobiscroll-lime"
                                        display="bubble"
                                        touchUi={false}
                                        placeholder="Please Select..."
                                    />
                                </label>
                            </mobiscroll.FormGroup>
                        </div>
                    </div>
                </div>
            </mobiscroll.Form>
        );
    }    
}

<div id="content"></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 React $595


Use Javascript when building with plain and simple JS. Use jQuery when you have jQuery already included or if you are building with jQuery Mobile. Use AngularJS when building with Angular 1.x or Ionic 1. Use Angular when building with Angular 2/4/5/6/7/8 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 React $595


  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Framework license


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

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

Use Javascript when building with plain and simple JS.

Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.

Use AngularJS when building with Angular 1.x or Ionic 1.

Use Angular when building with Angular 2/4/5/6/7/8 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.

Copy TS
Copy HTML
Copy CSS
Copy Module

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

Copy command
$ ionic serve

And voilà, everything should be running smoothly.

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

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Angular project

Copy command
$ mobiscroll config angular
$ mobiscroll config angular --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.

Copy TS
Copy HTML
Copy CSS
Copy Module

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

Copy command
$ ng serve

And voilà, everything should be running smoothly.

Thanks for downloading
Try and customize the app locally

Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.

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

Let us know if we can help and enjoy!

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

You are setting a password for the account

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

Your password has been changed!

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

Extract the zip file and open the demo in your favorite browser. To install Mobiscroll in your project follow instructions from this page.


Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Please extract the zip file and run the project like any Angular CLI app. Make sure to have the Angular CLI installed.

For installation and usage, extract the zip file and open a terminal window and follow these steps.

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

Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The easiest way to get started is to follow the installation steps and by grabbing the code directly from the demo page. Let us know if we can help and enjoy!

You'll find a fully functional Kitchen-sink Ionic app in the zip file.

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The demos are using Babel's in-browser ES6 and JSX transformer. Extract the zip file and open the demo in your browser. To install Mobiscroll in your project follow instructions from this page.


Let us know if we can help and enjoy! 👍

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