In web development, it is sometimes necessary to compare the time in the input box (mainly the start time and end time). After searching online, I found that many of them are invalid. The following method has been tested by my brother and is indeed effective, so I would like to share it. (Please pay attention to the red part)
function ValidtorTime(){
var d2 = new Date(document.getElementById('txbToDate')