Getting a build issue while using react-datePicker #4311
Unanswered
sathish869
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have used the react date picker like this
<DatePicker
selected={
instSumObject && instSumObject.to_date
? instSumObject.to_date
: ""
}
holidays={[]}
onChange={(date) => handleDateChange(date, "to_date")}
dateFormat="MM/dd/yyyy"
autoComplete="off"
minDate={calculateMinDate("to_date")}
maxDate={new Date()}
id="to_date"
customInput={}
/>
If im not minifying the code, it is working fine,but after minifying im getting the error like this
react-dom.production.min.js:4147 TypeError: Cannot read properties of undefined (reading 'holidays')
at n.calcInitialState (react-datepicker.min.js:2833:1)
at new n (react-datepicker.min.js:3294:10)
at wa (react-dom.production.min.js:2608:1)
at Ui (react-dom.production.min.js:3552:1)
at bu (react-dom.production.min.js:5480:1)
at bl (react-dom.production.min.js:5035:1)
at gl (react-dom.production.min.js:5029:21)
at cl (react-dom.production.min.js:4815:1)
at react-dom.production.min.js:2331:1
at t.unstable_runWithPriority (scheduler.production.min.js:252:1)
what is the root cause for this?
Beta Was this translation helpful? Give feedback.
All reactions