0.1.12 • Published 4 years ago

simple-persian-vue-datepicker v0.1.12

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

Simple persian vue datepicker

A fully support keyboard vue plugin to select jalali (persian) date

Installation :electric_plug:

npm

npm i simple-persian-vue-datepicker

Usage :computer:

globally

main.js

//...
import Picker from "simple-persian-vue-datepicker";
import "simple-persian-vue-datepicker/dist/simple-persian-vue-datepicker.css";

Vue.component("Picker", Picker);

//...

in components

component.vue

<template>

    <div>

        <Picker  v-model="date" />

    </div>

</template>

<script>

import Picker from 'simple-persian-vue-datepicker'

import "simple-persian-vue-datepicker/dist/simple-persian-vue-datepicker.css";



export default {

data(){

    return {

        date:  ''

    }

},

components: {

    Picker: Picker

}

}

</script>

Keyboard Options :keyboard:

you can control selected date by your keyboard the keys are :

keyfunction
arrow-upmove hover up
arrow-downmove hover down
arrow-leftmove hover left
arrow-rightmove hover right
wplus year
sminus year
aplus month
dminus month
spaceselect date

Props :heavy_plus_sign:

you can pass Your data to input whit these props:(none of them are required)

namefunctionality
inputPlaceholderset placeholder for input
inputDefaultselected date by default in format yyyy/mm/dd (pass now to select today)
inputStylestyle the input Described below

Style It :paintbrush:

Pass like props:

you can style component by passing below props to it

Style elements

Prop nameElement
inputStyleMain input

Example

<Picker v-model="date" inputStyle="background:red;border:10px solid black;" />

With CSS:

in this mode you can call below css classes to change the style of items:

class nameElement
spvd-inputinput
spvd-labelinput

License :newspaper:

This project is licensed under the MIT License