IO-1421 Add day of week to smart scheduling buttons.

This commit is contained in:
Patrick Fic
2021-10-04 11:48:55 -07:00
parent 4995e44e06
commit 0fd06d5e4e
2 changed files with 6 additions and 2 deletions

View File

@@ -124,7 +124,7 @@ export function ScheduleJobModalComponent({
handleDateBlur();
}}
>
<DateFormatter>{d}</DateFormatter>
<DateFormatter includeDay>{d}</DateFormatter>
</Button>
))}
</Space>

View File

@@ -3,7 +3,11 @@ import moment from "moment";
import React from "react";
export function DateFormatter(props) {
return props.children ? moment(props.children).format("MM/DD/YYYY") : null;
return props.children
? moment(props.children).format(
props.includeDay ? "ddd MM/DD/YYYY" : "MM/DD/YYYY"
)
: null;
}
export function DateTimeFormatter(props) {