A simplified jQuery date and time picker

Overview

jSunPicker

A simplified jQuery date and time picker

Why another Date picker?

There are numerous date, time pickers out there. However, each of those lack in one way or another. If they are feature-rich, they are bulky. If they are light-weight, they lack features. Some others which looked good are either abandoned or use jQuery UI! Many lacked semantic declaration (declaring options as element attributes say, data- attribute) which is a deal breaker for me as most of my code is dynamically generated. Some good looking ones were so buggy that I wasted more time trying to debug than making use of it. I felt that things could be written simple and still be feature-rich. Thus was born this project.

Features

jSunPicker has the following features:

  • Light-weight - 12kb minified, 4kb gzipped
  • Supports datetime, date, time, month and year picker
  • Separate date and time formats for display and submit
  • Dedicated button for current date and time
  • Semantic declaration - declare your options as javascript or as data- attributes or leave them at defaults
  • Supports all output formats and most input formats (to manually enter the date in the input element)
  • Date range restrictions - min-date, max-date and disable selected-dates (or ranges)
  • Time restrictions - min-time, max-time
  • Days restrictions - disable selective days (say, Sat & Sun)
  • Standardized date input formats for options
  • Customizable Title strings (multi-language support)
  • Customizable Start day (Monday can be your first day of the week)
  • Inline calendar or trigger from text field or custom icon
  • 9 gorgeous themes

Dependencies

Usage

Basic usage with default options

 $('selector').jSunPicker();

Specifying options in Javascript

 $('selector').jSunPicker({startDay:1, pickerType:'date', displayFormat:'m/d/Y'});

Semantic declaration (as selector's data- attributes)

HTML: Declare the options breaking with hiphens at camel-case characters like below. jQuery converts them to camel-case.

<input id='datepicker' data-start-day = '1' data-picker-type = 'date' />

JQuery: Basic markup. Any undeclared option will be substituted by the default values.

$('#datepicker').jSunPicker();

For detailed information and demo, visit the Project page below.

Project Page

Project documentation and demo can be found here: jSunPicker @Github

Inspiration

Heavily inspired by Will_pickdate() by TazSingh. Thanks TazSingh @tazsingh. I have been using that for more than a year but it has some serious bugs with min-max date restrictions. This has not been updated for a while and I also thought that the code could be lot simpler. So I borrowed the visual and navigation design (it was so beautiful) from that project and wrote my plugin from scratch.

Authors and Contributors

Ravi Iyer @sunalive. Fork or create a pull request if you wish to contribute. Source code is heavily commented for your understanding.

License

MIT License. Do whatever you wish.

Support or Contact

Submit a bug if you find any. I will fix them whenever possible, no time commitment. Feel free to create a pull request if you can help fix any.

You might also like...

Flat and simple color-picker library. No dependencies, no jquery.

Flat and simple color-picker library. No dependencies, no jquery.

Flat and simple color-picker Fully Featured demo Features Simple: The interface is straight forward and easy to use. Practical: Multiple color represe

Nov 14, 2022

Turn an HTML input box to a duration picker, without jQuery

html-duration-picker.js html-duration-picker.js is a very tiny JS library used for transforming a native HTML text input into a duration picker. The a

Oct 19, 2022

AWS Lambda and API Gateway, simplified for Javascript

AWS Lambda and API Gateway, simplified for Javascript

alanajs AWS Lambda and API Gateway, simplified for JavaScript About alanajs Make setting up Lambda microservices easier than ever. alanajs is a free,

Aug 1, 2022

A simplified list crud that adds, removes and edits items

To-do list This project is as simplified todo list crud. Built With HTML CSS JavaScript Webpack Live version See live version Getting Started To get a

Apr 2, 2022

⚡ It is a simplified database module with multiple functions that you can use simultaneously with sqlite, yaml, firebase and json.

Prisma Database Developed with 💙 by Roxza ⚡ An easy, open source database 📦 Installation npm i prisma.db --save yarn add prisma.db 🔮 Importing impo

Jan 3, 2023

Simplified JavaScript Jargon

Simplified JavaScript Jargon

Simplified JavaScript Jargon (short SJSJ) is a community-driven attempt at explaining the loads of buzzwords making the current JavaScript ecosystem i

Dec 30, 2022

An unofficial, simplified version of the @Shopify/koa-shopify-auth middleware library.

simple-koa-shopify-auth https://www.npmjs.com/package/simple-koa-shopify-auth NOTE: This package is not maintained by or affiliated with Shopify. Desc

Nov 7, 2022

Data-driven development, simplified.

Data-driven development, simplified.

CONTRACTUAL Table of Contents 0. Brief 1. Features 2. Installation 2.1 Download Installer 2.2 Fork and Clone Repo 3. How to Use 3.1 Contract Builder 3

Nov 8, 2022

Motionia is a lightweight simplified on demand animation library

Motionia is a lightweight simplified on demand animation library

The Ultimate & smart JS animation library! Simple fast , flexible & easy to integrate. No need to write page long CSS Keyframes that consumes a lot of

Dec 30, 2022
Comments
  • Date and Time Format Issue

    Date and Time Format Issue

    Hi,

    I'm getting this response "1466812800000" after submitting form in PHP. Submitting time and date from the form in this format 25 Jun 2016, 07:25 PM. Kindly let me know, What is the problem?

    opened by Hashymawan 1
Releases(v1.1)
Owner
null
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin

Zebra Datepicker A super-lightweight, highly configurable, cross-browser date/time picker jQuery plugin Zebra_Datepicker is a small yet and highly con

Stefan Gabos 391 Dec 29, 2022
Simple date and time picker in vanilla javascript

simplepicker Simple datetime picker in vanilla javascript. This project is mostly based on material-datetime-picker, but without it relying on externa

Priyank Patel 51 Jul 18, 2022
A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.

vanilla-datetimerange-picker Overview. A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js,

null 22 Dec 6, 2022
Bootstrap Persian/Gregorian Date Time Picker

MD.BootstrapPersianDateTimePicker Bootstrap 5+ Persian And Gregorian Date Time Picker Major changes: Using Bootstrap 5 jQuery Removed Rewrite all code

Mohammad Dayyan 305 Nov 23, 2022
A jQuery Plug-in to select the time with a clock inspired by the Android time picker.

Clock Timepicker Plugin for jQuery See a demo here A free jQuery Plug-in to select the time with a clock inspired by the Android time picker. This plu

Andy 51 Dec 22, 2022
this is a single-page web application. we built a book website where the user can add , remove and display books. we used modules to implement these functionalities. also, we used the Date class to display the date and time.

Awsome Books In this Project, we have built A Books websites. Built With ?? HTML CSS javascript Git & Github Live Demo Here you can find the live Demo

Nedjwa Bouraiou 10 Aug 3, 2022
Tool Cool Color Picker is a color picker library written in typescript and using web component technologies.

Tool Cool Color Picker Tool Cool Color Picker is a color picker library written in typescript and using web component technologies. Check out the demo

Tool Cool 13 Oct 23, 2022
Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.

Colr Pickr Colr Pickr, a vanilla JavaScript color picking component built with SVGs, with features like saving colors. Similar design to the chrome-de

TEK 27 Jun 27, 2022
📆 The modern, open source "Airbnb style" date picker.

Date Picker A pretty, modern date picker. Coming soon. ?? Get Started wip wip ?? Testing pnpm test ?? Changelog Please see our releases page for more

Open Web Foundation 8 Oct 11, 2022
This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

US-visa-appointment-notifier This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my in

Theophilus Omoregbee 13 Jan 4, 2023