From 8da7a059f9ca3dddfe98f22c1834b12a025844ce Mon Sep 17 00:00:00 2001 From: Minstel Date: Tue, 4 Dec 2018 23:59:04 +0700 Subject: [PATCH] Do not show year in title of day-month-only datepicker --- js/ractive-legalform.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/ractive-legalform.js b/js/ractive-legalform.js index cbe8b18..2c82958 100644 --- a/js/ractive-legalform.js +++ b/js/ractive-legalform.js @@ -200,7 +200,7 @@ //Use timeout because of some ractive bug: expressions, that depend on setting key, may be not updated, or can even cause an error setTimeout(function() { ractive.set(setName, newValue); - + if (newValue) { $(input).parent().removeClass('is-empty'); } @@ -330,7 +330,8 @@ var yearly = $inputGroup.find('input').attr('yearly'); $inputGroup.datetimepicker({ locale: ractive.getLocale('short'), - format: yearly ? 'DD-MM' : 'DD-MM-YYYY' + format: yearly ? 'DD-MM' : 'DD-MM-YYYY', + dayViewHeaderFormat: yearly ? 'MMMM' : 'MMMM YYYY' }); $(e.target).closest('.input-group-addon').trigger('click');