fix: cycle date validation (#922)
This commit is contained in:
parent
e53847c59e
commit
d041d8be6b
2 changed files with 37 additions and 18 deletions
|
|
@ -177,6 +177,12 @@ export const renderShortTime = (date: string | Date) => {
|
|||
export const isDateRangeValid = (startDate: string, endDate: string) =>
|
||||
new Date(startDate) < new Date(endDate);
|
||||
|
||||
export const isDateGreaterThanToday = (dateStr: string) =>{
|
||||
const date = new Date(dateStr);
|
||||
const today = new Date();
|
||||
return date > today;
|
||||
}
|
||||
|
||||
export const renderLongDateFormat = (dateString: string) => {
|
||||
const date = new Date(dateString);
|
||||
const day = date.getDate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue