vendor/assets/javascripts/uikit/components/datepicker.js in uikit2-rails-0.1.7 vs vendor/assets/javascripts/uikit/components/datepicker.js in uikit2-rails-0.1.8

- old
+ new

@@ -1,6 +1,6 @@ -/*! UIkit 2.26.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ +/*! UIkit 2.26.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ (function(addon) { var component; if (window.UIkit) { @@ -183,10 +183,10 @@ if (ele.hasClass('uk-datepicker-date-disabled')) return false; if (ele.is('[data-date]')) { active.current = moment(ele.data("date")); - active.element.val(active.current.format(active.options.format)).trigger("change"); + active.element.val(active.current.isValid() ? active.current.format(active.options.format) : null).trigger("change"); active.hide(); } else { active.add((ele.hasClass("uk-datepicker-next") ? 1:-1), "months"); } });