From 8b0dfa7a0e80fe7d098fa9aba8f10be7fd3cc3fb Mon Sep 17 00:00:00 2001 From: Claudio Escudero Date: Wed, 9 Oct 2013 17:43:53 -0300 Subject: [PATCH] Adding error notification --- src/js/bootstrap-datetimepicker.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/bootstrap-datetimepicker.js b/src/js/bootstrap-datetimepicker.js index 591bf42a5..fe870f89d 100644 --- a/src/js/bootstrap-datetimepicker.js +++ b/src/js/bootstrap-datetimepicker.js @@ -307,6 +307,13 @@ }); }, + notifyError: function(val){ + this.$element.trigger({ + type: 'changeError', + val: val + }); + }, + update: function(newDate){ var dateStr = newDate; if (!dateStr) { @@ -807,6 +814,7 @@ this.setValue(this._date.getTime()); if (this._date) this.set(); else input.val(''); + this.notifyError(val); } else { if (this._date) { this.setValue(null);