Getting started

It takes just 3 easy steps to integrate now.datetimepicker plugin with your website:

  1. Copy the dist folder to your working directory.

  2. Include JavaScript and CSS files in the <head> and <body> of your HTML page:

    <head>
        ...
        <link rel='stylesheet' type='text/css' href='dist/css/now.min.css'>
    </head>
    <body>
        ...
        <script type="text/javascript" src="dist/now.min.js"></script>
    </body>
    
  3. To attach a now.datetimepicker object to an element you desire, use this:

    new Now({
        input: document.getElementById('picker-input')
    });
    

    You can customize your plugin with options you provide to the constructor function:

    let nowInstance = new Now({
        container: document.getElementById('picker-container'),
        keyboardEvents: true,
        inline: true,
        locale: 'en',
        //etc...
    });
    

Development server

To start the development server, run the following commands:

npm i
npm run start

Setting a date

Any date in now.datetimepicker configuration can be specified:

Configuration

Events

Methods

Changelog