Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/4xmen/mpdatepicker

Materialize Persian Datepicker
https://github.com/4xmen/mpdatepicker

4xmen date datepicker javascript jquery jquery-plugin material-datepicker matrial-ui persian-calendar persian-datepicker persian-datetime persian-datetime-picker picker right-to-left xstack

Last synced: about 1 month ago
JSON representation

Materialize Persian Datepicker

Awesome Lists containing this project

README

        

# mpdatepicker

Materialize Persian Date and time picker by A1Gard 4xmen.ir

## installation

+ npm:
+ `npm i mpdatepicker`
+ yarn:
+ `yarn add mpdatepicker`

## screenshot

![mp datetime picker](screenshot.png)

## How to use

Add jquery:

```html

```

Add additional font for best view or use [Vazir-Matn-Font](https://www.npmjs.com/package/vazirmatn):

```html


```

Add css and jquery plugin To end of your project:

```html

```

Add Html :

```Html

```

use plugin :

```javascript
$(function () {
$(".sample-date-picker").mpdatepicker({
'timePicker': true,
onOpen: function () {
console.log('open');
},
onSelect: function (selected) {
console.log('select', selected);
},
onChange: function (oldVal, newVal) {
console.log('change', oldVal, newVal);
},
onClose: function () {
console.log('close');
},
});
});
```

## Options & events

| name | default | action |
| ------------ | ------------ | ------------ |
| timePicker | `false` | time picker active or not |
| timeChangeSensitivity | `5` | time picker sensitivity on drag up/down |
| fontStyle | `null` | font style for modal |
| gSpliter | `-` | split date |
| onOpen | event | trigger when open modal |
| onClose | event | trigger when close modal |
| onSelect | event | trigger on select end |
| onChange | event | trigger on change selected |