We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<DateRangeInput onDatesChange={data => dispatch({type: 'dateChange', payload: data})} onFocusChange={focusedInput => dispatch({type: 'focusChange', payload: focusedInput})} startDate={state.startDate} // Date or null endDate={state.endDate} // Date or null focusedInput={state.focusedInput} // START_DATE, END_DATE or null />
In DateRangeInput is there any way to set default startDate and endDate when the UI is rendered first?
And how shall we disable the edit option?
https://prnt.sc/s6v96u
The text was updated successfully, but these errors were encountered:
Here is an example:
const initialState = { startDate: new Date(), // Default start date endDate: new Date(), // Default end date focusedInput: null }; function reducer(state, action) { switch (action.type) { case "focusChange": return { ...state, focusedInput: action.payload }; case "dateChange": return action.payload; default: throw new Error(); } } ... const [state, dispatch] = useReducer(reducer, initialState);
Sorry, something went wrong.
No branches or pull requests
<DateRangeInput
onDatesChange={data => dispatch({type: 'dateChange', payload: data})}
onFocusChange={focusedInput => dispatch({type: 'focusChange', payload: focusedInput})}
startDate={state.startDate} // Date or null
endDate={state.endDate} // Date or null
focusedInput={state.focusedInput} // START_DATE, END_DATE or null
/>
In DateRangeInput is there any way to set default startDate and endDate when the UI is rendered first?
And how shall we disable the edit option?
https://prnt.sc/s6v96u
The text was updated successfully, but these errors were encountered: