Skip to content

Commit

Permalink
Merge pull request #40 from geoblink/feature/CORE-8095-GeoCalendar-di…
Browse files Browse the repository at this point in the history
…sable-input-when-necessary

Feature/core 8095 geo calendar disable input when necessary
  • Loading branch information
Navas23 authored Mar 23, 2020
2 parents 41783e3 + f3f48a5 commit a0eb0f2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 29.5.5

Fix:

- date inputs are disabled in `GeoCalendar` when granularity is non-daily

## 29.5.4

New:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@geoblink/design-system",
"version": "29.5.4",
"version": "29.5.5",
"description": "Geoblink Design System for Vue.js",
"author": "Geoblink <contact@geoblink.com>",
"main": "dist/system.js",
Expand Down
6 changes: 6 additions & 0 deletions src/elements/GeoCalendar/GeoCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
v-model="fromFormattedDate"
:placeholder="fromInputPlaceholder"
type="text"
:disabled="isInputDisabled"
:error="showFromFormatError"
:focus="isFromInputFieldFocused"
@focus="focusFromDateInput"
Expand Down Expand Up @@ -54,6 +55,7 @@
v-model="toFormattedDate"
:placeholder="toInputPlaceholder"
type="text"
:disabled="isInputDisabled"
:error="showToFormatError"
:focus="isToInputFieldFocused"
@focus="focusToDateInput"
Expand Down Expand Up @@ -211,6 +213,10 @@ export default {
isValidDate () {
return (date) => date && isValid(date) && this.isDateWithinBounds(date)
},
isInputDisabled () {
return this.granularityId !== GRANULARITY_IDS.day
}
},
Expand Down

1 comment on commit a0eb0f2

@vercel
Copy link

@vercel vercel bot commented on a0eb0f2 Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.