kbwood / calendars

jQuery World Calendars Plugin
88 stars 50 forks source link

inline Persian calendar seems squeezed #32

Closed hungryfrank closed 4 years ago

hungryfrank commented 4 years ago

what I use the inline calender Persian the calendar(not tried with other ones) it is squeezed i have a whitespace about 1/3 of the width of calendar on the right side of the container and the controllers are squeezed in

kbwood commented 4 years ago

Can you provide a page that shows the problem?

hungryfrank commented 4 years ago

here is my html code

the two dropdown would go on top each other and there was a gap I removed bold and they became ok and I added a fixed width of 220 px and it works now .calendars-month { float: left; width: 18em; border: 1px solid #444; text-align: center; width: 220px; } I can post an image or the html code off the page but I am having a problem with localization the Persian calendar <?php /* $Id$

osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com

Copyright (c) 2014 osCommerce

Released under the GNU General Public License */ ?> <!DOCTYPE html> <html <?php echo HTML_PARAMS; ?>>

<?php echo TITLE; ?> call('siteWide', 'injectSiteStart'); ?>
` I get [Error] TypeError: undefined is not an object (evaluating '$.calendarsPicker.defaultRenderer') (anonymous function) (jquery.calendars.picker.ext.js:48) Global Code (jquery.calendars.picker.ext.js:282) [Error] TypeError: undefined is not an object (evaluating '$.calendarsPicker.regionalOptions') (anonymous function) (jquery.calendars.picker-fa.js:7) Global Code (jquery.calendars.picker-fa.js:34) [Error] TypeError: $.calendars.substituteDigits is not a function. (In '$.calendars.substituteDigits(['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'])', '$.calendars.substituteDigits' is undefined) (anonymous function) (jquery.calendars.persian-fa.js:17) Global Code (jquery.calendars.persian-fa.js:22) [Error] TypeError: undefined is not an object (evaluating '$.datepick.regionalOptions') (anonymous function) (jquery.datepick-fa.js:7) Global Code (jquery.datepick-fa.js:43) [Error] TypeError: undefined is not an object (evaluating '$.datepick.setDefaults') (anonymous function) (blob.php:37) i (jquery-2.2.3.min.js:2:27157) fireWith (jquery-2.2.3.min.js:2:27916) ready (jquery-2.2.3.min.js:2:29719) J (jquery-2.2.3.min.js:2:29898)
kbwood commented 4 years ago

datepick is a separate plugin to the calendars and its datepicker. So don't load jquery.datepick-fa.js and don't set any defaults on $.datepick. The calendars datepicker plugin name is calendarsPicker, so your main code should be:

$(function() {
    $.calendarsPicker.setDefaults({renderer: $.calendarsPicker.themeRollerRenderer}); 
    var calendar = $.calendars.instance('persian');
    $('#popupDatepicker').calendarsPicker({calendar: calendar});
    $('#inlineDatepicker').calendarsPicker({calendar: calendar, onSelect: showDate});
});