Skip to content

Commit 609d2e4

Browse files
author
Ayoub Baàli
committed
changed date format to YYYY-mm-dd HH:MM
1 parent 6194b88 commit 609d2e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

webapp/javascript/components/CustomDatePicker.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function CustomDatePicker({ setRange, dispatch, setDateRange }) {
5151
showTimeSelect
5252
startDate={selectedDate.from}
5353
endDate={selectedDate.until}
54-
dateFormat="yyyy-dd-MM hh:mm aa"
54+
dateFormat="yyyy-MM-dd hh:mm aa"
5555
/>
5656
</div>
5757
<div className="until">
@@ -66,7 +66,7 @@ function CustomDatePicker({ setRange, dispatch, setDateRange }) {
6666
startDate={selectedDate.from}
6767
endDate={selectedDate.until}
6868
minDate={selectedDate.from}
69-
dateFormat="yyyy-dd-MM hh:mm aa"
69+
dateFormat="yyyy-MM-dd hh:mm aa"
7070
/>
7171
</div>
7272
{warning && <p style={{ color: "red" }}>Warning: invalid date Range</p>}

webapp/javascript/util/formatDate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function convertPresetsToDate(from) {
2424
}
2525

2626
export function readableRange(from, until) {
27-
const dateFormat = "YYYY-DD-MM hh:mm A";
27+
const dateFormat = "YYYY-MM-DD hh:mm A";
2828
if (/^now-/.test(from) && until === "now") {
2929
const { number, _multiplier } = convertPresetsToDate(from);
3030
return `Last ${number} ${_multiplier}`;

0 commit comments

Comments
 (0)