🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

A simple, convenient jQuery date picker plugin that works with Persian(Jalali) calendar, without any 3rd JavaScript libraries.

Date-Picker persian

Documentation

Datepicker Jalali

v 0.0.0.1 By Hossein Rafiee

A Datepicker library based on jQuery for Jalali (Shamsi) date

Demo link

Requirements

  • jQuery version >= 1

How to use

Add style to head of your HTML file

<link rel="stylesheet" href="../dist/datepicker.css"> 

Add scripts of jQuery and Datepicker

<script src="../src/jquery-3.2.1.min.js"></script> <script src="../dist/datepicker.js"></script> 

Create a tag (anything you thinks,you need it ) and an input

<div class="calender"></div> <input type="text" id="calendarInput"> 

So here we run Datepicker on it

$(".calender").datepicker({     altField : "#calendarInput",     date : "2015-01-02" });

Options

option default values description
altField "" "selector of input" you must fill this option to show your pick date
altSecondaryField null "selector of input" optional for secondary field for Gregorian Date
minDate null "1394-01-06" optional for define your minimum date by Jalali Date
maxDate null "1396-05-12" optional for define your minimum date by Jalali Date
navRight "<" "anything" optional navigation definition
navLeft ">" "anything" optional navigation definition
format "short" "short","long" optional for define your export format
view "day" "day","month","year" optional for change start view of datepicker
pick "day" "day","month","year" optional for picking on datepicker if pick bigger than view then view equals to pick
date mybirthday:) "2016-12-28" required for showing today on datepicker
gregorian false false , true for change altField export to Gregorian date

Licence and Credits

The code and the documentation are released under the MIT License


You May Also Like