You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we set the luxon config to Settings.throwOnInvalid = true we get an error when we open up the antd date range picker (using "month" picker)
I don't deeply understand the rc-picker code, but a few things stuck out to me: the luxon code is parsing using a "yyyy-MM-dd" format while dayjs seems to allow for both padded and non-padded month ['YYYY-M-DD', 'YYYY-MM-DD']
This doesn't really cause issues if we ignore the error, so our workaround is to change that throwOnInvalid setting, but we would strongly prefer for parsing errors to throw. This may be an issue with antd's picker and could raise the issue there if you think that's better, but I do think the config generation for different libraries should have the same behavior. If dayjs accepts that format, then it seems like luxon also should accept it. I did a quick test and I believe"yyyy-M-dd" will work for both 2023-1-01 and 2023-01-01 cases, so that is potentially a simple fix if this doesn't have other side effects.
The text was updated successfully, but these errors were encountered:
rc-picker version: 3.8.1
antd version: 5.6.0
luxon version: 3.3.0
When we set the luxon config to
Settings.throwOnInvalid = true
we get an error when we open up the antd date range picker (using "month" picker)I don't deeply understand the rc-picker code, but a few things stuck out to me:
the luxon code is parsing using a
"yyyy-MM-dd"
format while dayjs seems to allow for both padded and non-padded month['YYYY-M-DD', 'YYYY-MM-DD']
This doesn't really cause issues if we ignore the error, so our workaround is to change that
throwOnInvalid
setting, but we would strongly prefer for parsing errors to throw. This may be an issue with antd's picker and could raise the issue there if you think that's better, but I do think the config generation for different libraries should have the same behavior. If dayjs accepts that format, then it seems like luxon also should accept it. I did a quick test and I believe"yyyy-M-dd"
will work for both2023-1-01
and2023-01-01
cases, so that is potentially a simple fix if this doesn't have other side effects.The text was updated successfully, but these errors were encountered: