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 +})();