Skip to content

Commit

Permalink
fix issues lazy localization
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhyuwa committed Mar 20, 2021
1 parent 90554b4 commit 9473896
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 26 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ All notable changes to this project will be documented in this file.

- Added trigger `emit` on keyup event.

## [1.0.12]

- Fix issues localization lazy load.

[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
Expand All @@ -75,3 +79,4 @@ All notable changes to this project will be documented in this file.
[1.0.9]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.9
[1.0.10]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.10
[1.0.11]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.11
[1.0.12]: https://github.com/kenhyuwa/litepie-datepicker/releases/tag/v1.0.12
2 changes: 1 addition & 1 deletion dev/serve.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default defineComponent({
},
setup() {
const away = ref(null);
const dateValue = ref([]);
const dateValue = ref('30 Oktober 2021 ~ 18 Februari 2023');
const shortcuts = () => {
return [
{
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "litepie-datepicker",
"version": "1.0.11",
"version": "1.0.12",
"description": "A date range picker component for Vue.js and Tailwind CSS, dependent to day.js",
"main": "dist/litepie-datepicker.ssr.js",
"browser": "dist/litepie-datepicker.esm.js",
Expand Down
22 changes: 1 addition & 21 deletions src/litepie-datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1380,29 +1380,9 @@ export default /*#__PURE__*/ defineComponent({
watch(
() => isShow.value,
newValue => {
() => {
nextTick(() => {
placement.value = useVisibleViewport(LitepieRef.value);
if (newValue && pickerValue.value !== '') {
if (asRange()) {
const [s, e] = pickerValue.value.split(props.separator);
const start = dayjs(s, props.formatter.date, true);
const end = dayjs(e, props.formatter.date, true);
datepicker.value.previous = start;
if (start.isSame(end, 'month')) {
datepicker.value.next = start.add(1, 'month');
} else {
datepicker.value.next = end;
}
} else {
datepicker.value.previous = dayjs(
pickerValue.value,
props.formatter.date,
true
);
datepicker.value.next = datepicker.value.previous.add(1, 'month');
}
}
});
}
);
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
manifestOptions: {
orientation: 'landscape',
orientation: 'portrait',
background_color: '#ffffff',
icons: [
{
Expand Down

0 comments on commit 9473896

Please sign in to comment.