npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mc-react-datepicker

v1.0.4

Published

A two month view datepicker component (one month view on mobile). View a working demo [here](http://mc-datepicker.matine.co.uk).

Readme

MC Date Picker

A two month view datepicker component (one month view on mobile). View a working demo here.

mc-datepicker-screenshot

Getting Started

Install the package via npm

npm install mc-react-datepicker --save

Import and render the datepicker

Once the datepicker is in the node_modules folder, you can import it on your page and render it with an optional userConfig object passed in, as explained below.

Import the datepicker:

import McReactDatepicker from 'mc-react-datepicker';

Render the datepicker with (optional) userConfig object):

<McReactDatepicker userConfig={userConfig}></McReactDatepicker>

Include the styles

Both the compiled CSS and raw SASS files are available for you to use depending on which you prefer in your setup.

datepicker.css

datepicker.scss

User configuration object

The datepicker accepts an optional user configuration object with the following properties explained.

selectedStartDefaultString

Type: String

Default: "Start date"

Description: The text that appears in the input field for the start date, when a date has not yet been selected

Example:

selectedStartDefaultString : "Check In",

selectedEndDefaultString

Type: String

Default: "End date"

Description: The text that appears in the input field for the end date, when a date has not yet been selected

Example:

selectedEndDefaultString : "Check Out",

disabledDays

Type: Array

Default: null

Description: Disabled date ranges. Each item in the array should be an object with two properties 'firstDay' and 'lastDay' with date objects as the values.

Example:

disabledDays : [
    {
        firstDay : new Date("October 16, 2016"),
        lastDay : new Date("October 19, 2016")
    },
    {
        firstDay : new Date("December 4, 2016"),
        lastDay : new Date("December 4, 2016"),
    }
]

classNames

Type: Object

Default: (various classes)

Description: Adding classes to the main elements, using the properties: 'datepicker', 'dateInputsWrapper', 'dateInput', 'dateInputStart', 'dateInputEnd', 'calendarWrapper', 'calendar'. You can also add more than one class by adding a gap between in the string.

Example:

classNames : {
    datepicker: "my-datepicker my-datepicker-one",
    dateInputsWrapper: "date-inputs-wrapper",
    dateInput: "date-input",
    dateInputStart: "date-input-start",
    dateInputEnd: "date-input-end",
    calendarWrapper: "my-calendar-wrapper",
    calendar: "my-calendar"
}

theme

Type: Object

Default: (various colours: "#565a5c", "#66e2da", "#99ede6", "#00a699")

Description: Colour theming for the input field active states, the selected days and inbetween days. The two nested objects are 'inputs' and 'days' which contain properties that accept a string colour value.

Example:

theme : {
    inputs : {
        activeBackgroundColor: "#ffcccc",
        activeColor: "#565a5c"
    },
    days : {
        selectedBackgroundColor: "#ff4d4d",
        inbetweenBackgroundColor: "#ffcccc",
    }
}

Full example

The example below shows the datepicker fully configured.

import React from 'react';
import McReactDatepicker from 'mc-react-datepicker';

var App = React.createClass({

	render : function() {
		var config = {
			selectedStartDefaultString : "Start date",
			selectedEndDefaultString : "End date",
			disabledDays : [
				{
					firstDay : new Date("October 16, 2016"),
					lastDay : new Date("October 19, 2016")
				},
				{
					firstDay : new Date("December 4, 2016"),
					lastDay : new Date("December 4, 2016"),
				}
			],
			classNames : {
				datepicker: "my-datepicker my-datepicker-one",
				dateInputsWrapper: "date-inputs-wrapper",
				dateInput: "date-input",
				dateInputStart: "date-input-start",
				dateInputEnd: "date-input-end",
				calendarWrapper: "my-calendar-wrapper",
				calendar: "my-calendar"
			},
			theme : {
				inputs : {
					activeBackgroundColor: "#ffcccc",
					activeColor: "#565a5c"
				},
				days : {
					selectedBackgroundColor:"#ff4d4d",
					inbetweenBackgroundColor: "#ffcccc",
				}
			}
		}

		return (
			<McReactDatepicker userConfig={config}></McReactDatepicker>
		)
	}
});

export default App;

MC Datepicker built by Matine Chabrier matine.co.uk