Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pikaday

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pikaday

A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS

  • 1.8.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
291K
decreased by-2.24%
Maintainers
1
Weekly downloads
 
Created

What is pikaday?

Pikaday is a lightweight JavaScript datepicker with no dependencies. It provides a simple and user-friendly interface for selecting dates, and it can be easily integrated into web applications.

What are pikaday's main functionalities?

Basic Datepicker

This code initializes a basic datepicker on an input field with the ID 'datepicker'.

var picker = new Pikaday({ field: document.getElementById('datepicker') });

Date Range Selection

This code sets up two datepickers for selecting a start and end date, useful for date range selection.

var startDatePicker = new Pikaday({ field: document.getElementById('start-date') });
var endDatePicker = new Pikaday({ field: document.getElementById('end-date') });

Custom Date Format

This code initializes a datepicker with a custom date format of 'D MMM YYYY'.

var picker = new Pikaday({ field: document.getElementById('datepicker'), format: 'D MMM YYYY' });

Disable Specific Dates

This code initializes a datepicker that disables weekends (Saturdays and Sundays).

var picker = new Pikaday({ field: document.getElementById('datepicker'), disableDayFn: function(date) { return date.getDay() === 0 || date.getDay() === 6; } });

Localization

This code initializes a datepicker with German localization.

var picker = new Pikaday({ field: document.getElementById('datepicker'), i18n: { previousMonth : 'Vorheriger Monat', nextMonth     : 'Nächster Monat', months        : ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'], weekdays      : ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], weekdaysShort : ['So','Mo','Di','Mi','Do','Fr','Sa'] } });

Other packages similar to pikaday

Keywords

FAQs

Package last updated on 22 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc