diff --git a/.prettierignore b/.prettierignore index 0832e14..147a418 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,5 @@ /node_modules/** /client/build/** /tests/unit/coverage/** +*.vue +*.md diff --git a/README.md b/README.md index 241285a..3e43ac0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ This is a VueJs version of the popular AirBnb datepicker. Supports range selecti Datepicker on tablet Datepicker on mobile +## Development +- Requires Node 10 +- Run `npm run dev` and visit [http://localhost:5050]() + ## Documentation [Full documentation on GitBooks](https://mikaeledebro.gitbooks.io/vue-airbnb-style-datepicker/) diff --git a/package-lock.json b/package-lock.json index e77ac91..7536af3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vue-airbnb-style-datepicker", - "version": "2.3.0", + "version": "2.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -20710,4 +20710,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index f81e82b..c6c764b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-airbnb-style-datepicker", - "version": "2.3.0", + "version": "2.3.1", "description": "A VueJs version of the popular AirBnb datepicker", "main": "dist/vue-airbnb-style-datepicker.cjs.js", "module": "dist/vue-airbnb-style-datepicker.es.js", @@ -80,4 +80,4 @@ "pre-commit": "pretty-quick --staged" } } -} \ No newline at end of file +} diff --git a/poi.config.js b/poi.config.js index 0bfe577..06ab41c 100644 --- a/poi.config.js +++ b/poi.config.js @@ -3,5 +3,6 @@ module.exports = { entry: 'dev/index.js', dist: 'dev/dist', homepage: '/vue-airbnb-style-datepicker/', - presets: [require('poi-preset-eslint')({ mode: '*' })], + // Disabled due to many existing eslint errors + // presets: [require('poi-preset-eslint')({ mode: '*' })], } diff --git a/src/components/AirbnbStyleDatepicker.vue b/src/components/AirbnbStyleDatepicker.vue index b264b96..4f69842 100644 --- a/src/components/AirbnbStyleDatepicker.vue +++ b/src/components/AirbnbStyleDatepicker.vue @@ -297,6 +297,8 @@ export default { chooseStartDate: date => `Choose ${date} as your start date.`, chooseEndDate: date => `Choose ${date} as your end date.`, selectedDate: date => `Selected. ${date}`, + selectedStartDate: date => `Selected ${date} as your start date.`, + selectedEndDate: date => `Selected ${date} as your end date.`, unavailableDate: date => `Not available. ${date}`, previousMonth: 'Move backward to switch to the previous month.', nextMonth: 'Move forward to switch to the next month.', @@ -591,7 +593,15 @@ export default { } const isSelected = this.isSelected(date) + if (isSelected) { + if (this.isRangeMode) { + if (this.dateOne === this.selectedDate1) { + return this.ariaLabels.selectedStartDate(dateLabel) + } else { + return this.ariaLabels.selectedEndDate(dateLabel) + } + } return this.ariaLabels.selectedDate(dateLabel) }