Pretty Persian Date Time Picker with jQuery and Bootstrap 4/3

Pretty Persian Date Time Picker with jQuery and Bootstrap 4/3
File Size: 136 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A pretty date & time jQuery plugin which enables you to select Persian(jalali) date and/or date range from a calendar popup based on Bootstrap 4 or Bootstrap 3 popover component.

Dependencies:

See also:

How to use it:

1. Load jQuery JavaScript library and other required resources in the document.

<link href="/path/to/bootstrap.min.css" rel="stylesheet">
  ...
<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/bootstrap.min.js"></script>
<script src="/path/to/jalaali.js"></script>

2. Load the jQuery MD.BootstrapPersianDateTimePicker plugin's JS and CSS files in the document.

<link rel="stylesheet" href="jquery.Bootstrap-PersianDateTimePicker.css">
<script src="jquery.Bootstrap-PersianDateTimePicker.js"></script>

3. Create a normal text input for the date time picker. Plugin's options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-placement="right".

<input id="textbox" type="text" value="۱۳۹۲/۰۱/۰۱"
       data-mddatetimepicker="true"  
       data-placement="right"
>

4. Full plugin options with default values.

englishNumber: false,
placement: 'bottom',
trigger: 'click',
enableTimePicker: false,
targetTextSelector: '',
targetDateSelector: '',
toDate: false,
fromDate: false,
groupId: '',
disabled: false,
textFormat: '',
dateFormat: '',
isGregorian: false,
inLine: false,
selectedDate: undefined,
selectedDateToShow: new Date(),
monthsToShow: [0, 0],
yearOffset: 30,
holiDays: [],
disabledDates: [],
disableBeforeToday: false,
disableAfterToday: false,
disableBeforeDate: undefined,
disableAfterDate: undefined,
rangeSelector: false,
rangeSelectorStartDate: undefined,
rangeSelectorEndDate: undefined

Changelog:

2018-11-09

  • Update

2018-11-03

  • v3.2.6: some changes; bugfix

2018-10-16

  • v3.2.5: Fix a bug in MonthDropDown

2018-10-10

  • fix a bug in disabledDates

2018-10-02

  • add parser

2018-09-30

  • Added more features.

2018-09-15

  • Fix a bug in set hour

2018-09-12

  • Bugfix

2018-09-11

  • add date range support

2018-09-10

  • Bugfix & Update

2018-06-19

  • Bugfix

2018-03-15

  • Added inline mode

2018-02-19

  • Change version to upload on npm

2018-01-28

  • update.

2017-09-23

  • update.

2017-05-13

  • update.

2017-01-16

  • update.

2016-10-30

  • update.

2016-09-23

  • update.

2016-09-17

  • update.

2016-08-14

  • bugfix

2016-05-21

  • bugfix

2016-01-27

  • Add Disabled to settings

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