Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions dev/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
:mode="'range'"
:date-one="inputDateOne"
:date-two="inputDateTwo"
:min-date="'2018-08-28'"
:min-date="new Date('2018-08-28')"
:months-to-show="2"
:show-action-buttons="true"
:show-month-year-select="true"
Expand Down Expand Up @@ -63,7 +63,7 @@
:mode="'range'"
:date-one="buttonDateOne"
:date-two="buttonDateTwo"
:min-date="'2018-04-18'"
:min-date="new Date('2018-04-18')"
:fullscreen-mobile="true"
:months-to-show="2"
:trigger="trigger"
Expand All @@ -90,8 +90,8 @@
:fullscreen-mobile="false"
:date-one="inlineDateOne"
:months-to-show="2"
:disabled-dates="['2018-04-30', '2018-05-10', '2018-12-14']"
:customized-dates="[{ dates: ['2019-03-21', '2019-03-22', '2019-03-23', '2019-03-24'], cssClass: 'booked' }, { dates: ['2019-03-21', '2019-03-22', '2019-03-23', '2019-04-24'], cssClass: 'not-available' }]"
:disabled-dates="[new Date('2018-04-30'), new Date('2018-05-10'), new Date('2018-12-14')]"
:customized-dates="[{ dates: [new Date('2019-03-21'), new Date('2019-03-22'), new Date('2019-03-23'), new Date('2019-03-24')], cssClass: 'booked' }, { dates: [new Date('2019-03-21'), new Date('2019-03-22'), new Date('2019-03-23'), new Date('2019-04-24')], cssClass: 'not-available' }]"
@date-one-selected="val => { inlineDateOne = val }"
/>
</div>
Expand Down Expand Up @@ -149,17 +149,17 @@ import format from 'date-fns/format'
export default {
data() {
return {
dateFormat: 'YYYY-MM-DD', //'D MMM',
inputDateOne: '',
inputDateTwo: '',
inputSingleDateOne: '',
inputSingleDateTwo: '',
buttonDateOne: '',
buttonDateTwo: '',
inlineDateOne: '',
withDisabledDatesDateOne: '',
callbackDateOne: '',
callbackDateTwo: '',
dateFormat: 'yyyy-MM-dd', //'d MMM',
inputDateOne: null,
inputDateTwo: null,
inputSingleDateOne: null,
inputSingleDateTwo: null,
buttonDateOne: null,
buttonDateTwo: null,
inlineDateOne: null,
withDisabledDatesDateOne: null,
callbackDateOne: null,
callbackDateTwo: null,
sundayFirst: false,
alignRight: false,
showDatepickers: true,
Expand All @@ -168,13 +168,13 @@ export default {
},
computed: {
disabledDates() {
return ['2018-12-30', '2018-12-10', '2018-12-14']
return [new Date('2018-12-30'), new Date('2018-12-10'), new Date('2018-12-14')]
},
},
created() {
setTimeout(() => {
this.inputDateOne = '2019-01-12'
this.inputDateTwo = ''
this.inputDateOne = new Date('2019-01-12')
// this.inputDateTwo = ''
}, 5000)
},
methods: {
Expand Down
4 changes: 2 additions & 2 deletions docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ NB: Note that you need to wrap the datepicker in a `<div class="datepicker-trigg
| days | Name of days in your language. **Must start with monday**<br>Type: Array<string> |
| daysShort | Short name of days in your language (what's shown in the days legend). **Must start with monday**<br>Type: Array<string> |
| monthNames | Names of months in your language.<br>Type: Array<string> |
| dateLabelFormat | Used to override the formatting string used for rendering aria labels. Defaults to 'dddd, MMMM D, YYYY'. <br>Type: String |
| dateLabelFormat | Used to override the formatting string used for rendering aria labels. Defaults to 'iiii, MMMM d, yyyy'. <br>Type: String |
| colors | Override default colors. Use hex values (#efefef)<br>Type: Object |
| texts | Override default texts (currently only "Cancel", "Apply", and "Keyboard shortcuts")<br>Type: Object |
| ariaLabels | Override default aria-label texts. Current options include chooseDate, chooseStartDate, chooseEndDate, selectedDate, unavailableDate, previousMonth, nextMonth, close, openKeyboardShortcutsMenu, and openKeyboardShortcutsMenu. Labels that end in `Date` are functions which accept a date string for constructing the label text, the rest of the labels are plain strings.<br>Type: Object |
Expand All @@ -116,7 +116,7 @@ _Example with all available options_:
```javascript
Vue.use(AirBnbStyleDatepicker, {
sundayFirst: false,
dateLabelFormat: 'dddd, MMMM D, YYYY',
dateLabelFormat: 'iiii, MMMM d, yyyy',
days: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
daysShort: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
monthNames: [
Expand Down
38 changes: 19 additions & 19 deletions docs/USAGE-WITH-CDN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@ The methods used (and that you need to include in your app) are the following. N

```javascript
import format from 'date-fns/format'
import subMonths from 'date-fns/sub_months'
import addMonths from 'date-fns/add_months'
import getDaysInMonth from 'date-fns/get_days_in_month'
import lastDayOfMonth from 'date-fns/last_day_of_month'
import getMonth from 'date-fns/get_month'
import setMonth from 'date-fns/set_month'
import getYear from 'date-fns/get_year'
import setYear from 'date-fns/set_year'
import isSameMonth from 'date-fns/is_same_month'
import isSameDay from 'date-fns/is_same_day'
import addDays from 'date-fns/add_days'
import subDays from 'date-fns/sub_days'
import addWeeks from 'date-fns/add_weeks'
import subWeeks from 'date-fns/sub_weeks'
import startOfWeek from 'date-fns/start_of_week'
import endOfWeek from 'date-fns/end_of_week'
import isBefore from 'date-fns/is_before'
import isAfter from 'date-fns/is_after'
import isValid from 'date-fns/is_valid'
import subMonths from 'date-fns/subMonths'
import addMonths from 'date-fns/addMonths'
import getDaysInMonth from 'date-fns/getDaysInMonth'
import lastDayOfMonth from 'date-fns/lastDayOfMonth'
import getMonth from 'date-fns/getMonth'
import setMonth from 'date-fns/setMonth'
import getYear from 'date-fns/getYear'
import setYear from 'date-fns/setYear'
import isSameMonth from 'date-fns/isSameMonth'
import isSameDay from 'date-fns/isSameDay'
import addDays from 'date-fns/addDays'
import subDays from 'date-fns/subDays'
import addWeeks from 'date-fns/addWeeks'
import subWeeks from 'date-fns/subWeeks'
import startOfWeek from 'date-fns/startOfWeek'
import endOfWeek from 'date-fns/endOfWeek'
import isBefore from 'date-fns/isBefore'
import isAfter from 'date-fns/isAfter'
import isValid from 'date-fns/isValid'
```
Loading