npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

md.bs3-persian-date-time-picker

v2.4.0

Published

Persian Date Time Picker with jQuery & Bootstrap 3.3.*

Readme

MD.BootstrapPersianDateTimePicker

Bootstrap 3

MD.BootstrapPersianDateTimePicker MD.BootstrapPersianDateTimePicker

MD.BootstrapPersianDateTimePicker is a DateTimePicker plugin for jquery and Bootstrap 3.

Note:

This plugin is not compatible with Bootstrap4+.

To see demo just open Demo folder and run the html files. Don't build the project, it's not a C# project. MD.BootstrapPersianDateTimePicker uses bootstrap Popovers, so it has felexibility of bootstrap's popover.

There is a file in Manual folder that you can learn how to use this plugin.


Installing:

npm install md.bs3-persian-date-time-picker

Now add these files to you html:

<link href="/Content/MdBootstrapPersianDateTimePicker/jquery.Bootstrap-PersianDateTimePicker.css" rel="stylesheet" />

<script src="/Scripts/MdBootstrapPersianDateTimePicker/jalali.js"></script>
<script src="/Scripts/MdBootstrapPersianDateTimePicker/jquery.Bootstrap-PersianDateTimePicker.js"></script>

I suggest to add scripts at the end of body tag and after jQuery library.

There are two approaches to use MdPersianDateTime

  • Use JavaScript and jQuery.
<script type="text/javascript">
    $('#textBoxInputId').MdPersianDateTimePicker({
		Placement: 'left',
		Trigger: 'click',
		EnableTimePicker: false,
		TargetSelector: '#ElementId',
		GroupId: '',
		ToDate: false,
		FromDate: false,
		DisableBeforeToday: false,
		Disabled: false,
		Format: 'yyyy/MM/dd',
		IsGregorian: false,
		EnglishNumber: false,
		InLine: false
    });
</script>
  • Use html tags attributes. In this approach you can determine the settings with the following attributes:
data-mddatetimepicker="true" data-placement="bottom" data-trigger="focus" data-enabletimepicker="true" data-targetselector="#fromDate1" data-groupid="group1" data-todate="true"
data-fromdate="true" data-englishnumber="true" data-disabled="false" data-isgregorian="false" data-format="yyyy/MM/dd" data-disablebeforetoday="false" data-inline="false"
<button class="btn btn-default" data-MdDateTimePicker="true" data-TargetSelector="#input1" data-EnableTimePicker="true" data-Placement="left" data-Trigger="click">
  انتخاب تاریخ
</button>

Options:

Default values are into [ ]

| Name | Values | Description | Sample | | -------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------- | --------------------- | | EnglishNumber | [false], true | Switch between English number or Persian number | | Placement | top, right, [bottom], left | Position of date time picker | | Trigger | [click], mousedown, focus, ... | Event to show date time picker | | EnableTimePicker | [false], true | Time picker visibility | | TargetSelector | String | CSS selector to show selected date into it | '#ElementId' | | ToDate | [false], true | When you want to set date picker as toDate to enable date range selecting | | FromDate | [false], true | When you want to set date picker as fromDate to enable date range selecting | | GroupId | String | When you want to use toDate, fromDate you have to enter a group id to specify date time pickers | 'dateRangeSelector1' | | Disabled | [false], true | Disable date time picker | | Format | String | date selecting string format | 'yyyy/MM/dd HH:mm:ss' | | IsGregorian | [false], true | Is calendar Gregorian | | InLine | [false], true | Is date time picker in line |

String format:

| Format | English Description | Persian Description | | -------- | ----------------------- | -------------------------------- | | yyyy | Year, 4 digits | سال چهار رقمی | | yy | Year, 2 digits | سال دو رقمی | | MMMM | Month name | نام ماه | | MM | Month, 2 digits | عدد دو رقمی ماه | | M | Month, 1 digit | عدد تک رقمی ماه | | dddd | Week day name | نام روز هفته | | dd | Month's day, 2 digits | عدد دو رقمی روز | | d | Month's day, 1 digit | عدد تک رقمی روز | | HH | Hour, 2 digits - 0 - 24 | عدد دو رقمی ساعت با فرمت 0 تا 24 | | H | Hour, 1 digit - 0 - 24 | عدد تک رقمی ساعت با فرمت 0 تا 24 | | hh | Hour, 2 digits - 0 - 12 | عدد دو رقمی ساعت با فرمت 0 تا 12 | | h | Hour, 1 digit - 0 - 12 | عدد تک رقمی ساعت با فرمت 0 تا 12 | | mm | Minute, 2 digits | عدد دو رقمی دقیقه | | m | Minute, 1 digit | عدد تک رقمی دقیقه | | ss | Second, 2 digits | ثانیه دو رقمی | | s | Second, 1 digit | ثانیه تک رقمی | | tt | AM / PM | ب.ظ یا ق.ظ | | t | A / P |

Functions:

| Name | Description | Sample | | ------------ | -------------------------------------- | --------------------------------------------------------------------------------- | | getValue | Get value of datetime picker | $('[data-name="datepicker1"]').MdPersianDateTimePicker('getValue'); | | setValue | Set value of datetime picker as string | $('[data-name="datepicker1"]').MdPersianDateTimePicker('setValue', '1396-12-28'); | | getDate | Get Date object of datetime picker | $('[data-name="datepicker1"]').MdPersianDateTimePicker('getDate'); | | setDate | Set selected date of datetime picker | $('[data-name="datepicker1"]').MdPersianDateTimePicker('setDate', new Date()); | | hide | Hide datetime picker | $('[data-name="datepicker1"]').MdPersianDateTimePicker('hide'); | | show | Show datetime picker | $('[data-name="datepicker1"]').MdPersianDateTimePicker('show'); |

Events

MD.BootstrapPersianDateTimePicker uses Bootstrap's popover, so you can use popover events.

| Event Type | Description | Sample | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------ | | show.bs.popover | This event fires immediately when the show instance method is called. | | shown.bs.popover | This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete). | | hide.bs.popover | This event is fired immediately when the hide instance method has been called. | | hidden.bs.popover | This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete). | | inserted.bs.popover | This event is fired after the show.bs.popover event when the popover template has been added to the DOM. |

If you are using .Net for programming, I recommend to use the following library to parse and use PersianDateTime as easy as DateTime. MD.PersianDateTime