Skip to content

Commit

Permalink
fix(date-picker): disable mobile UI (#4443)
Browse files Browse the repository at this point in the history
This change disables `flatpickr`'s mobile mode, given we have been not
supporting the mobile UI and the mobile UI has caused several
JavaScript errors.

Fixes #4420.
  • Loading branch information
asudoh authored Oct 25, 2019
1 parent 2811a2c commit ad98531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class DatePicker extends mixin(
Object.assign(flattenOptions(this.options), {
allowInput: true,
mode: type,
disableMobile: true,
positionElement:
type === 'range' &&
this.element.querySelector(this.options.selectorDatePickerInputFrom),
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ export default class DatePicker extends Component {
// inputField ref might not be set in enzyme tests
if (this.inputField) {
this.cal = new flatpickr(this.inputField, {
disableMobile: true,
defaultDate: value,
appendTo,
mode: datePickerType,
Expand Down

0 comments on commit ad98531

Please sign in to comment.