Fix notifications max time check
This commit is contained in:
parent
1f3e0596b1
commit
1e5afda77c
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ import { setSession } from '@/src/store/dataStore';
|
|||
import { ThemedIcon } from '@/src/components/themed/ThemedIcon';
|
||||
|
||||
interface NotificationType {
|
||||
key: 'dayBefore' | 'sameDay' | 'pickup';
|
||||
key: string;
|
||||
label: string;
|
||||
defaultTime: string;
|
||||
minTime?: string;
|
||||
|
@ -131,8 +131,8 @@ export default function CategoryScreen() {
|
|||
Message.error( t( "notifications-before-16-00" ) );
|
||||
return;
|
||||
}
|
||||
} else if (notification.minTime) {
|
||||
const maxDate = new Date( `1970-01-01T${notification.minTime}` );
|
||||
} else if (notification.maxTime) {
|
||||
const maxDate = new Date( `1970-01-01T${notification.maxTime}` );
|
||||
if (maxDate < selectedDate) {
|
||||
Message.error( t( "notifications-after-09-00" ) );
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue