Persian (Jalali) Calendar & Data Picker Plugin With jQuery - kamaDatepicker

Persian (Jalali) Calendar & Data Picker Plugin With jQuery - kamaDatepicker

kamaDatepicker is a customizable jQuery Jalali (Shamsi) calendar plugin for jQuery that makes it easier to select Persian(Jalali) dates with lots of useful options.

See also:

How to use it:

1. Add references to jQuery library and the jQuery kamaDatepicker plugin's files into the webpage.

<link rel="stylesheet" href="kamadatepicker.css">
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="kamadatepicker.js"></script>

2. Call the function on the target date input to generate a default Jalali calendar.

kamaDatepicker('data-input');

3. To config the Jalali calendar plugin, just pass pass an option object as the second parameter to the kamaDatepicker function.

kamaDatepicker('data-input', {
  // placeholder text
  placeholder: "",
  // enable 2 digits
  twodigit: true,
  // close calendar after select
  closeAfterSelect: true,
  // nexy / prev buttons
  nextButtonIcon: "بعدی",
  previousButtonIcon: "قبلی ",
  // color of buttons
  buttonsColor: "پیشفرض ",
  // force Farsi digits
  forceFarsiDigits: false,
  // highlight today
  markToday: false,
  // highlight holidays
  markHolidays: false,
  // highlight user selected day
  highlightSelectedDay: false,
  // true or false
  sync: false,
  // display goto today button
  gotoToday: false
  
});

Changelog:

2018-12-23

  • Accept range in year dropdown

This awesome jQuery plugin is developed by Hadi290. For more Advanced Usages, please check the demo page or visit the official website.

  • Publication date: 23.12.2018
  • Source