Minimal Date Picker Calendar In Pure JS – pureJSCalendar

Category: Date & Time , Javascript | January 13, 2019
Author: MrGuiseppe
Views Total: 2,624
Official Page: Go to website
Last Update: January 13, 2019
License: MIT

Preview:

Minimal Date Picker Calendar In Pure JS – pureJSCalendar

Description:

A pure JavaScript calendar component allows the user to select a date from a clean calendar popup. Without any dependencies.

How to use it:

Download and import the pureJSCalendar’s files into the html file.

<link rel="stylesheet" href="css/calendar.css">
<script src="scripts/pureJSCalendar.js"></script>

Create an input filed to store the selected date.

<input type="text" id="example">

Open the calendar and save the selected date in the input field you just created.

// pureJSCalendar.open(dateFormat, x, y, firstDayOfWeek, minDate, maxDate, element, zindex)
pureJSCalendar.open('dd.MM.yyyy', 20, 30, 1, '2018-5-5', '2019-8-20', 'example', 20)

Close the calendar.

pureJSCalendar.close()

Changelog:

01/13/2018

  • JS update

You Might Be Interested In:


2 thoughts on “Minimal Date Picker Calendar In Pure JS – pureJSCalendar

  1. Wagner Ferreira.

    Hi, your last update resolved the undefined problem for january, but is limiting the days of january equal the days of current month.
    Let me explain better, on january i only been able to select til 13th of the month, that is the same that ocurs on february.

    Reply
  2. Mike D

    Hi – Lovely calendar, but I am having an issue where some months it only lets me select the first two weeks of the month. Could this be related to a local issue, using US date formats?

    Reply

Leave a Reply