Skip to content

Commit

Permalink
Helper::sanitizeDatepickerDatetime() function
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Dec 15, 2023
1 parent 3d522c4 commit ab854be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Misc/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2111,4 +2111,12 @@ public static function detectCloudFlare()
return false;
}
}

// Correct format: 2023-12-14 19:21
// Datepicker with enableTime option enabled
// may return value in different format on iOS Safari: 2023-12-14T11:25
public static function sanitizeDatepickerDatetime($datetime)
{
return str_replace('T', ' ', $datetime);
}
}

0 comments on commit ab854be

Please sign in to comment.