From c8da59c75a76af51045005f51da998a083a30ea4 Mon Sep 17 00:00:00 2001 From: Ashutosh Dhundhara Date: Sun, 23 Mar 2014 19:01:41 +0530 Subject: [PATCH] Bug: Datepicker icon not showing on "Add Event" dialog. Signed-off-by: Ashutosh Dhundhara --- js/rte.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/rte.js b/js/rte.js index c42bd97ef3..f819e335e5 100644 --- a/js/rte.js +++ b/js/rte.js @@ -304,14 +304,20 @@ RTE.COMMON = { buttons: that.buttonOptions, title: data.title, modal: true, + open: function () { + $(this).find('input[name=item_name]').focus(); + $(this).find('input.datefield').each(function () { + PMA_addDatepicker($(this).css('width', '95%'), 'date'); + }); + $(this).find('input.datetimefield').each(function () { + PMA_addDatepicker($(this).css('width', '95%'), 'datetime'); + }); + $.datepicker.initialized = false; + }, close: function () { $(this).remove(); } }); - that.$ajaxDialog.find('input[name=item_name]').focus(); - that.$ajaxDialog.find('input.datefield, input.datetimefield').each(function () { - PMA_addDatepicker($(this).css('width', '95%')); - }); /** * @var mode Used to remeber whether the editor is in * "Edit" or "Add" mode