File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
66import React , { Component } from 'react' ;
77import TextInput from './TextInput' ;
88import Dropdown from './Dropdown' ;
9+ import { MULTI_VALUED_PLACEHOLDER } from 'lib/constants' ;
910
1011const testDate = '2000-01-01' ;
1112const testTime = '00:00' ;
@@ -16,8 +17,12 @@ export default class DateTimePicker extends Component {
1617 constructor ( props , context ) {
1718 super ( props , context ) ;
1819 const { time, date} = this . parsePlotlyJSDateTime ( props . value ) ;
19- const isValidTime = isDateTime ( testDate + ' ' + time ) || [ '' , timePlaceholder ] . includes ( time ) ;
20- const isValidDate = isDateTime ( date + ' ' + testTime ) || [ '' , datePlaceholder ] . includes ( date ) ;
20+ const isValidTime =
21+ isDateTime ( testDate + ' ' + time ) ||
22+ [ '' , timePlaceholder , MULTI_VALUED_PLACEHOLDER ] . includes ( time ) ;
23+ const isValidDate =
24+ isDateTime ( date + ' ' + testTime ) ||
25+ [ '' , datePlaceholder , MULTI_VALUED_PLACEHOLDER ] . includes ( date ) ;
2126
2227 this . state = {
2328 calendarOpen : false ,
You can’t perform that action at this time.
0 commit comments