Skip to content

Date and datetime field timezone fixes #2680

New issue

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

Merged
merged 47 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
eaccd8b
task: create new field date time component
finnar-bin Apr 3, 2024
95612ce
task: add support for timepicker props
finnar-bin Apr 3, 2024
22f2fe4
task: set value for date and time
finnar-bin Apr 3, 2024
bbca14b
task: dispatch on clear event
finnar-bin Apr 3, 2024
386b33b
task: set value
finnar-bin Apr 3, 2024
63ed292
task: autofill time
finnar-bin Apr 3, 2024
b3f7d15
task: autofill date and time
finnar-bin Apr 3, 2024
1f3d7c7
chore: cleanup
finnar-bin Apr 4, 2024
053d55a
task: add datetime preview
finnar-bin Apr 4, 2024
71518ce
chore: cleanup
finnar-bin Apr 4, 2024
f0f3ed9
task: add filtering logic
finnar-bin Apr 4, 2024
2f1dd8f
task: always show the first 5 closest times as suggestions
finnar-bin Apr 4, 2024
adb8a24
task: moved filtering logic to utils
finnar-bin Apr 4, 2024
8fd615c
task: set closest matched time on blur
finnar-bin Apr 4, 2024
02e1ccb
task: show error tooltip and border
finnar-bin Apr 4, 2024
26aa3c5
chore: add comments
finnar-bin Apr 5, 2024
63abfd9
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 5, 2024
4a0db20
task: fixed minutes matching minute input pass 59
finnar-bin Apr 5, 2024
fc9283d
task: allow custom time input
finnar-bin Apr 5, 2024
52ec875
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 5, 2024
ea534b4
task: reset to last valid time when time format is invalid on blur
finnar-bin Apr 5, 2024
e1bb21d
task: reset to last valid time input on enter with invalid input
finnar-bin Apr 5, 2024
a7f559b
task: show all time options and change logic to show invalid time error
finnar-bin Apr 5, 2024
648c1b6
chore: move prop position around
finnar-bin Apr 5, 2024
0685e3c
chore: refactor
finnar-bin Apr 5, 2024
dc73dac
task: scroll time options into view
finnar-bin Apr 8, 2024
70e6b7d
fix: fixed 12:00 am showing as invalid
finnar-bin Apr 8, 2024
c77fae2
task: derive time from user input on enter
finnar-bin Apr 8, 2024
8b1c960
task: derive time from user input on enter
finnar-bin Apr 8, 2024
990b2ac
task: auto set input value on blur
finnar-bin Apr 8, 2024
ca1d0fe
task: show error when required and value is empty
finnar-bin Apr 8, 2024
bfbffb0
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 11, 2024
08f31a7
task: add unit tests
finnar-bin Apr 11, 2024
ad180a1
chore: cleanup
finnar-bin Apr 11, 2024
0912a8f
chore: cleanup
finnar-bin Apr 11, 2024
ef05410
task: fix tests
finnar-bin Apr 11, 2024
f4696ad
task: update date test
finnar-bin Apr 11, 2024
790f88d
task: update date test
finnar-bin Apr 11, 2024
bbb207d
task: update date test
finnar-bin Apr 11, 2024
2082e93
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 11, 2024
a5348a7
task: fix tests
finnar-bin Apr 11, 2024
cdf5a2f
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 14, 2024
284c9c1
task: re-add missing props
finnar-bin Apr 14, 2024
a5e9000
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 15, 2024
d2e37cb
Merge branch 'dev' into enhancement/datetimefield-revamp
finnar-bin Apr 16, 2024
5cdc174
fix: make sure tz is preserved
finnar-bin Apr 16, 2024
9a8654c
fix: do not do any tz conversion for date field
finnar-bin Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ export const Field = ({
<FieldTypeDate
name={name}
required={required}
value={value ? new Date(value) : null}
value={value ? moment(value).toDate() : null}
// format="MMM dd, yyyy"
onChange={(date) => onDateChange(date, name, datatype)}
error={errors && Object.values(errors)?.some((error) => !!error)}
Expand Down
2 changes: 1 addition & 1 deletion src/shell/components/FieldTypeDateTime/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const FieldTypeDateTime = ({
<FieldTypeDate
name={name}
required={required}
value={dateString ? new Date(dateString) : null}
value={dateString ? moment(dateString).toDate() : null}
onChange={(date) => {
if (date) {
onChange(
Expand Down