From 1730ca5d668dd321cd19f7aa5a1414dee300589f Mon Sep 17 00:00:00 2001 From: Shane Donnelly Date: Fri, 21 Mar 2014 10:00:21 -0400 Subject: [PATCH] add custom width option --- glDatePicker.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/glDatePicker.js b/glDatePicker.js index a7f1873..ad97a1d 100644 --- a/glDatePicker.js +++ b/glDatePicker.js @@ -181,7 +181,10 @@ onHide: function(calendar) { calendar.hide(); }, // First date of the month. - firstDate: null + firstDate: null, + + //Custom width of date picker + width: null }; // Our plugin object @@ -307,7 +310,7 @@ var monthNames = options.monthNames || [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; // Create cell width based on el size - var containerWidth = el.outerWidth(); + var containerWidth = options.width ? options.width : el.outerWidth(); var containerHeight = containerWidth; // Create cell size based on container size @@ -815,4 +818,4 @@ return $.inArray(value, this); } })(); -})(); \ No newline at end of file +})();