fix: weird date override behaviour (#12292)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
This commit is contained in:
parent
28acbe549a
commit
57a65401e7
|
@ -82,7 +82,8 @@ const DateOverrideForm = ({
|
|||
|
||||
const form = useForm({
|
||||
values: {
|
||||
range: value
|
||||
range:
|
||||
value && value[0].start.valueOf() !== value[0].end.valueOf()
|
||||
? value.map((range) => ({
|
||||
start: new Date(
|
||||
dayjs
|
||||
|
@ -128,7 +129,7 @@ const DateOverrideForm = ({
|
|||
? selectedDates.map((date) => {
|
||||
return {
|
||||
start: date.utc(true).startOf("day").toDate(),
|
||||
end: date.utc(true).startOf("day").add(1, "day").toDate(),
|
||||
end: date.utc(true).startOf("day").toDate(),
|
||||
};
|
||||
})
|
||||
: datesInRanges
|
||||
|
|
Loading…
Reference in New Issue
Block a user