Skip to content

Commit

Permalink
fix bug when use custom shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhyuwa committed Mar 12, 2021
1 parent 2dd334b commit 0e5f024
Show file tree
Hide file tree
Showing 9 changed files with 219 additions and 87 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Expand Up @@ -8,21 +8,26 @@ All notable changes to this project will be documented in this file.

## [1.0.0]

- First release
- First release.
## [1.0.1]

- Make stable release
- Make stable release.

## [1.0.2]

- Expose `placeholder`, `clear` function to slot
- Expose `placeholder`, `clear` function to slot.

## [1.0.3]

- Fix typo `inRangeDateBetween`
- Fix typo `inRangeDateBetween`.

## [1.0.4]

- Fixed `shortcuts` when use custom.

[Released]: https://github.com/kenhyuwa/litepie-datepicker/
[1.0.0]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.0
[1.0.1]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.1
[1.0.2]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.2
[1.0.3]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.3
[1.0.4]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.4
14 changes: 12 additions & 2 deletions dev/serve.vue
Expand Up @@ -80,10 +80,20 @@ export default defineComponent({
const shortcuts = () => {
return [
{
label: 'Last 15 Days',
label: 'Tomorrow',
atClick: () => {
const date = new Date();
return [new Date(date.setDate(date.getDate() - 15)), new Date()];
return [new Date(date.setDate(date.getDate() + 1)), date];
}
},
{
label: 'Last Years',
atClick: () => {
const date = new Date();
return [
new Date(date.setFullYear(date.getFullYear() - 1)),
new Date()
];
}
}
];
Expand Down
2 changes: 1 addition & 1 deletion docs/public/index.html
Expand Up @@ -21,7 +21,7 @@
property="og:description"
content="A date range picker component for Vue.js and Tailwind CSS, dependent to day.js."
/>
<meta property="og:image" content="<%= BASE_URL %>img/logo.png" />
<meta property="og:image" content="https://raw.githubusercontent.com/kenhyuwa/litepie-datepicker/main/assets/light-mode.png" />
<link
rel="apple-touch-icon"
sizes="180x180"
Expand Down

0 comments on commit 0e5f024

Please sign in to comment.