All Projects → talkhabi → Vue Persian Datetime Picker

talkhabi / Vue Persian Datetime Picker

A vue plugin to select jalali date and time

Projects that are alternatives of or similar to Vue Persian Datetime Picker

Vue Ui For Pc
基于Vue2.x的一套PC端UI组件,包括了Carousel 跑马灯、Cascader 级联、Checkbox 多选框、Collapse 折叠面板、DatePicker 日期选择、Dialog 对话框、Form 表单、Input 输入框、InputNumber 数字输入框、Layer 弹窗层、Loading 加载、Menu 菜单、Page 分页、Progress 进度条、Radio 单选框、SelectDropDown 仿select、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 文字提示、BackTop 返回顶部、steps 步骤条、Transfer 穿梭框、Tree 树形、Upload 文件上传、Lazy 图片懒加载、Loading 加载、Pagination 分页等等
Stars: ✭ 156 (-58.95%)
Mutual labels:  vue-components, datepicker
React Modern Calendar Datepicker
A modern, beautiful, customizable date picker for React
Stars: ✭ 555 (+46.05%)
Mutual labels:  persian, datepicker
Pd Select
vue components ,like ios 3D picker style,vue 3d 选择器组件,3D滚轮
Stars: ✭ 101 (-73.42%)
Mutual labels:  vue-components, datepicker
Persianrangedatepicker
Persian range date picker for android.
Stars: ✭ 48 (-87.37%)
Mutual labels:  persian, datepicker
Persian Date Picker Dialog
Persian Date Picker Dialog for Android
Stars: ✭ 205 (-46.05%)
Mutual labels:  persian, datepicker
vue-date-range-picker
A vue component using Bootstrap 4 styles for date range selection
Stars: ✭ 30 (-92.11%)
Mutual labels:  vue-components, datepicker
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+524.47%)
Mutual labels:  vue-components, datepicker
React Native Jalali Datepicker
📅 React Native Jalali DatePicker component for both Android and iOS ✨
Stars: ✭ 52 (-86.32%)
Mutual labels:  persian, datepicker
Persiandatepicker
An Android DatePicker for Persian Calendar
Stars: ✭ 86 (-77.37%)
Mutual labels:  persian, datepicker
react-calendar-datetime-picker
A simple and fast date and time picker component for React
Stars: ✭ 58 (-84.74%)
Mutual labels:  datepicker, persian
PersianDateRangePicker
Select range of date and time in the Persian
Stars: ✭ 41 (-89.21%)
Mutual labels:  datepicker, persian
Handycontrols
Contains some simple and commonly used WPF controls based on HandyControl
Stars: ✭ 347 (-8.68%)
Mutual labels:  persian
Quasar
Quasar Framework - Build high-performance VueJS user interfaces in record time
Stars: ✭ 20,090 (+5186.84%)
Mutual labels:  vue-components
Vux
Mobile UI Components based on Vue & WeUI
Stars: ✭ 17,573 (+4524.47%)
Mutual labels:  vue-components
Vue Simple Suggest
Feature-rich autocomplete component for Vue.js
Stars: ✭ 324 (-14.74%)
Mutual labels:  vue-components
Vue Framework Wz
👏vue后台管理框架👏
Stars: ✭ 3,757 (+888.68%)
Mutual labels:  vue-components
Liquor Tree
Tree component based on Vue.js
Stars: ✭ 348 (-8.42%)
Mutual labels:  vue-components
Scrollabledatepicker
Yet another datepicker for iOS
Stars: ✭ 326 (-14.21%)
Mutual labels:  datepicker
Coreui Vue
Over 90 Bootstrap based Vue.js components and directives. CoreUI React.js UI Components. CoreUI for Vue.js replaces and extends the Bootstrap javascript. Components have been built from scratch as true Vue components, without jQuery and unneeded dependencies.
Stars: ✭ 318 (-16.32%)
Mutual labels:  vue-components
Vue Functional Calendar
Vue.js Functional Calendar | Component/Package
Stars: ✭ 314 (-17.37%)
Mutual labels:  datepicker

vue-persian-datetime-picker

npm version

A vue plugin to select jalali date and time

See documentation and demo at vue-persian-datetime-picker

Installation

browser

<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/moment"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/moment-jalaali.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-persian-datetime-picker/dist/vue-persian-datetime-picker-browser.js"></script>
<div id="app">
    <date-picker v-model="date"></date-picker>
</div>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            date: '1397/02/02'
        },
        components: {
            DatePicker: VuePersianDatetimePicker
        }
    });
</script>

npm

npm install vue-persian-datetime-picker --save

webpack.config.js:

/**
 * configuration for moment to ignore loading locales
 */
module.exports.plugins = [
    //...
    new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
    //...
]

Usage

main.js

//...
import VuePersianDatetimePicker from 'vue-persian-datetime-picker';
Vue.component('date-picker', VuePersianDatetimePicker);
//...

Or in component

<template>
    <div>
        <date-picker v-model="date"></date-picker>
    </div>
</template>
 
<script>
    import VuePersianDatetimePicker from 'vue-persian-datetime-picker'
    export default {
        data(){
            return {
                date: ''
            }
        },
        components: {
            datePicker: VuePersianDatetimePicker
        }
    }
</script>

You can also set default values:

main.js

import VuePersianDatetimePicker from 'vue-persian-datetime-picker';
Vue.use(VuePersianDatetimePicker, {
    name: 'custom-date-picker',
    props: {
        inputFormat: 'YYYY-MM-DD HH:mm',
        format: 'jYYYY-jMM-jDD HH:mm',
        editable: false,
        inputClass: 'form-control my-custom-class-name',
        placeholder: 'Please select a date',
        altFormat: 'YYYY-MM-DD HH:mm',
        color: '#00acc1',
        autoSubmit: false,
        //...  
        //... And whatever you want to set as default 
        //... 
    }
});

Then use in component

<custom-date-picker v-model="date"></custom-date-picker>

Click to see full documentation and demo

Built With

  • Vue.js - The Progressive JavaScript Framework.
  • Moment.js - Parse, validate, manipulate, and display dates and times in JavaScript.
  • moment-jalaali - A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.

License

This project is licensed under the MIT License

Change log

2.6.0 (2021-02-05)

2.5.0 (2021-01-30)

2.4.1 (2020-11-13)

2.4.0 (2020-10-17)

  • Added compat-time to display time on the front page (in datetime mode)
  • Fixed clear value #125
  • Fixed disabling in datetime mode #123
  • Fixed timezone in the first and second half of the year #108

2.3.0 (2020-08-30)

  • Added convert-numbers prop that converts numbers to persian in fa locale: <date-picker convert-numbers />

2.2.0 (2020-08-02)

2.1.6 (2020-07-13)

  • Fixed locale-config prop #116
  • Added show-now-btn prop #109

2.1.5 (2020-04-19)

  • Fixed wrong date in Safari browsers
  • Fixed scroll to element (year section)

2.1.4 (2020-01-30)

  • Fixed initial locale value

2.1.2 (2019-09-08)

  • Fixed jumpMinute and roundMinute in datetime mode
  • Fixed time animation effect

2.1.1 (2019-09-07)

  • Fixed JumpMinute and hour change

2.1.0 (2019-08-19)

  • Added "year-month" type <date-picker type="year-month" />. fixed #70
  • Timezone support <date-picker type="datetime" :timezone="true" />. fixed #33

2.0.2 (2019-07-17)

  • Flipped month change buttons in rtl direction
  • Added label to locales. fixed #67
  • Added display format to each locale. fixed #68
  • Fixed wrong date on date-time picker mode

2.0.1 (2019-05-11)

  • Fixed #53
  • Show the next step on submit button click, instead of submitting immediately #41

2.0.0 (2019-01-16)

  • Added gregorian support <date-picker locale="en" />
  • Added locale configuration support
  • Improved css transitions
  • Fixed min-max in time picker

1.1.7 (2018-12-31)

1.1.6 (2018-12-29)

  • Added jumpMinute and roundMinute to time-picker <date-picker type="time" :jumpMinute="5" :roundMinute="true" />
  • Added clear button <date-picker :clearable="true" />
  • Added inline mode <date-picker :inline="true" />
  • Fixed tab key press problem
  • Fixed responsive mode
  • Fixed watching to min-max changes

1.1.5 (2018-09-01)

  • Added emit on open
  • Added feature to highlight items and dates

1.1.4 (2018-08-12)

  • Added label for display
  • Added feature to disable some dates
  • Added feature to disable or enable the datepicker
  • Icons and css styles optimization
  • Load component via script tag

1.1.3 (2018-05-22)

  • Fixed "min-date" bug

1.1.2 (2018-05-12)

  • Updated "moment-jalaali" version to 0.7.3
  • Fixed "display-format" when is editable
  • Reset "view" value

1.1.1 (2018-05-03)

  • Added "append-to"
  • Added "display format"

1.1.0 (2018-05-01)

  • Added default settings feature

1.0.9 (2017-12-25)

  • Clear input value
  • Fixed editable input bug
  • Added "Initial value"
  • Package keywords
  • Fixed css class name
  • Fixed some other bugs

1.0.7 (2017-12-14)

  • Avoid submitting form
  • Auto submit on wrapper click

1.0.5 (2017-12-04)

  • Fixed default value for "value"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].