Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
The error occurs because the parseDate function cannot return a valid date for a time string e.g 12:00 AM. The change introduced in this PR appends the time to the current date string so that the function can return a valid date.
if (self.isValidTime(date)) {
const currentDate = new Date();
date = `${currentDate.toDateString()} ${date}`;
}
Description
The error occurs because the
parseDate
function cannot return a valid date for a time string e.g12:00 AM
. The change introduced in this PR appends the time to the current date string so that the function can return a valid date.Related Issues
Fixes #2557