FIX: auto-close time can be a date like 2015-2-22

This commit is contained in:
Neil Lalonde 2015-02-10 17:10:20 -05:00
parent c0856daf13
commit d5712e43cf

View file

@ -28,7 +28,7 @@ export default Ember.Component.extend({
// only # of hours in limited mode
return t.match(/^(\d+\.)?\d+$/);
} else {
if (t.match(/^\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{2}(\s?[AP]M)?$/i)) {
if (t.match(/^\d{4}-\d{1,2}-\d{1,2}(?: \d{1,2}:\d{2}(\s?[AP]M)?){0,1}$/i)) {
// timestamp must be in the future
return moment(t).isAfter();
} else {