jonthornton / Datepair.js

A javascript plugin for intelligently selecting date and time ranges, inspired by Google Calendar.
https://www.jonthornton.com/Datepair.js
358 stars 87 forks source link

Invalid time values.Require to allow only numbers #79

Closed avinash-ramireddy closed 7 years ago

avinash-ramireddy commented 8 years ago

Hi, I have a requirement where in time-picker(jquery),only numbers are allowed. But look at image attached which is doing nothing when something strange is passed.

screenshot 121

Also,I am unable to produce any triggering for "rangeError"

jonthornton commented 7 years ago

That situation will trigger a rangeIncomplete event, because the invalid times are treated as nulls.

avinash-ramireddy commented 7 years ago

After typing I moved my cursor out of focus. But when you see the image it's showing as valid range selected instead of rangeIncomplete.

Am I wrong? If it's a feature then I need to empty it,instead of showing that kind of letters.How can I do that?