mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-22 14:29:36 +02:00
Fix date formatting for constraint dates in DateRangeCollapse component
This commit is contained in:
parent
13bc748d0d
commit
89c4f1058a
1 changed files with 7 additions and 3 deletions
|
@ -64,11 +64,15 @@
|
||||||
|
|
||||||
// Get constraint dates in the right format based on allDay setting
|
// Get constraint dates in the right format based on allDay setting
|
||||||
$: constraintStartDate = allDay
|
$: constraintStartDate = allDay
|
||||||
? fullStartDate
|
? fullStartDate && fullStartDate.includes('T')
|
||||||
? fullStartDate.split('T')[0]
|
? fullStartDate.split('T')[0]
|
||||||
: ''
|
: ''
|
||||||
: fullStartDate;
|
: fullStartDate || '';
|
||||||
$: constraintEndDate = allDay ? (fullEndDate ? fullEndDate.split('T')[0] : '') : fullEndDate;
|
$: constraintEndDate = allDay
|
||||||
|
? fullEndDate && fullEndDate.includes('T')
|
||||||
|
? fullEndDate.split('T')[0]
|
||||||
|
: ''
|
||||||
|
: fullEndDate || '';
|
||||||
|
|
||||||
// Update local display dates whenever timezone or UTC dates change
|
// Update local display dates whenever timezone or UTC dates change
|
||||||
$: if (!isEditing) {
|
$: if (!isEditing) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue