1.1.5 • Published 4 years ago

vue-jquery-calendar v1.1.5

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

vue-jquery-calendar

npm version

vue-jquery-calendar is wrapper vue package of jquery ui datepicker

Installation

npm install --save vue-jquery-calendar

Or using yarn

yarn add vue-jquery-calendar -dev

For Installing plugin import vue-jquery-calendar in your component page.

//foo.vue
import VueJqueryCalendar from 'vue-jquery-calendar';
export default {
  components: {
    VueJqueryCalendar,
  },
}

Note

Please note that this package depends on jQuery and jquery-ui, but you won't need to add it to your project manually, vue-jquery-calendar will handle this for you automatically if this dependencies are not detected.

CSS

For vue-jquery-calendar appearance import jquery-ui css in App.vue main file

<style>
@import '~jquery-ui-dist/jquery-ui.css';
</style>

Example App

try out this Code Sandbox

Basic Usage

You can pass an array of fullclendar objects through the props

<VueJqueryCalendar v-model="date" :class-name="'form-control'" date-format="dd-mm-yy" :readonly="true" />
...
<script>
import moment from 'moment';
import VueJqueryCalendar from 'vue-jquery-calendar';
...
  components: {
	VueJqueryCalendar,
  },
  data() {
    return {
        date: moment().subtract(30, "days").format("DD-MM-YYYY"),
    }
  }
...
</script>

Props

NameTypeDefaultDescription
valueStringnullValue of the input DOM
showButtonPanelBooleanfalseTo display a button pane underneath the calendar
changeMonthBooleanfalseThe month should be rendered as a dropdown instead of text
changeYearBooleanfalseThe year should be rendered as a dropdown instead of text
numberOfMonthsNumber1The number of months to display in a single row
dateFormatString'dd/mm/yy'The format for parsed and displayed dates
readonlyBooleanfalseCalendar input field set as read-only mode
classNameStringnullCalendar input class name set

Events

NameDescription
changeget value on change date