From ad76668c68ff24ed823a02092d51bf2c0567123a Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 13 Mar 2011 18:40:26 +0000 Subject: Fixes #3110 - checking selector before running date picker js git-svn-id: http://code.elgg.org/elgg/trunk@8688 36083f99-b078-4883-b0ff-0f9b5a30f544 --- js/lib/ui.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/lib/ui.js b/js/lib/ui.js index 8d519a995..22475df93 100644 --- a/js/lib/ui.js +++ b/js/lib/ui.js @@ -18,8 +18,10 @@ elgg.ui.init = function () { $('.elgg-menu-page .elgg-menu-parent').live('click', elgg.ui.toggleMenu); $('.elgg-requires-confirmation').live('click', elgg.ui.requiresConfirmation); - - $('.elgg-input-date').datepicker(); + + if ($('.elgg-input-date').length) { + $('.elgg-input-date').datepicker(); + } } /** -- cgit v1.2.3