fixed min and max datetimes

This commit is contained in:
AmirHossein Mahmoodi
2025-09-02 10:09:00 +03:30
parent 1f585fe18e
commit 0253b06018
4 changed files with 52 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
export const makeDateTime = (date, time) => {
if (!date) return null;
const d = new Date(date);
if (time) {
const t = new Date(time);
d.setHours(t.getHours(), t.getMinutes(), 0, 0);
}
return d;
};