kbwood / calendars Goto Github PK
View Code? Open in Web Editor NEWjQuery World Calendars Plugin
jQuery World Calendars Plugin
I'm getting an error
Uncaught TypeError: year.calendar is not a function
at GregorianCalendar._validate (jquery.calendars.js:747)
at GregorianCalendar.newDate (jquery.calendars.js:429)
at GregorianCalendar.fromJSDate (jquery.calendars.js:966)
at GregorianCalendar.today (jquery.calendars.js:443)
at d.setDate (jquery.calendars.picker.js:1370)
at d._attachments (jquery.calendars.picker.js:683)
at d._postAttach (jquery.calendars.picker.js:623)
at d._postAttach (....\src\js\jquery.plugin.js:37)
at d._attach (....\src\js\jquery.plugin.js:198)
at HTMLInputElement. (....\src\js\jquery.plugin.js:169)
I'm also using daterangepicker
and when I remove it the error is gone so apparently there is a conflict
I also find similar problem on stackoverflow on similar problem
https://stackoverflow.com/questions/43777269/date-js-conflicting-with-the-keith-wood-calendar-picker
so how can I use this picker along with daterangepicker ?
If you try to use the monthsOffset=2 with 3 calendars at the same time and maxDate, seems that the next button never gets disabled.
With the gregorian & Vietnamese language calendar instance, we are unable to parseDate if the date format is yyyy-M-dd.
It is failing only when dates are fallen in months of Tháng 10', 'Tháng 11', 'Tháng 12'
const calendar = $.calendars.instance('gregorian', 'vi')
const date = calendar.parseDate('yyyy-M-dd', '19-Tháng 10-16'); // Throwing invalid literal character
Short names for months in Vietnamese are
monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
Since Tháng 10 contains Tháng 1,
line number 303 in jquery.calendars.plus.js has
if (value.substr(iValue, names[i].length).toLowerCase() === names[i].toLowerCase()) {
iValue += names[i].length;
return i + calendar.minMonth;
}
is wrongly calculating and subsequent checkLiteral function is throwing error.
Nepali Calendar doest't work for Year 2081 onwards, pleae update the nepali year matrix
NEPALI_CALENDAR_DATA = {
// These data are derived from official Nepali calendar sources
2081: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
2082: [17, 31, 31, 32, 31, 32, 31, 30, 30, 29, 30, 30, 30],
2083: [17, 31, 31, 32, 31, 31, 32, 30, 30, 29, 30, 30, 30],
2084: [17, 31, 31, 32, 31, 32, 31, 30, 30, 29, 30, 30, 30],
2085: [17, 31, 32, 31, 32, 31, 31, 30, 30, 29, 30, 30, 30],
2086: [17, 31, 32, 31, 32, 31, 30, 31, 30, 29, 30, 30, 30],
2087: [16, 31, 31, 32, 31, 31, 32, 30, 30, 29, 30, 30, 30],
2088: [16, 31, 31, 32, 32, 31, 30, 31, 30, 29, 30, 30, 30],
2089: [17, 31, 32, 31, 32, 31, 30, 30, 31, 29, 30, 30, 30],
2090: [17, 31, 32, 31, 32, 31, 30, 31, 30, 29, 30, 30, 30],
2091: [16, 31, 31, 32, 31, 32, 31, 30, 30, 29, 30, 30, 30],
2092: [16, 31, 31, 32, 32, 31, 30, 31, 30, 29, 30, 30, 30],
2093: [17, 31, 32, 31, 32, 31, 30, 30, 31, 29, 30, 30, 30],
2094: [17, 31, 31, 32, 31, 31, 32, 30, 30, 29, 30, 30, 30],
2095: [17, 31, 31, 32, 31, 32, 31, 30, 30, 29, 30, 30, 30],
2096: [17, 31, 32, 31, 32, 31, 30, 31, 30, 29, 30, 30, 30],
2097: [17, 31, 32, 31, 32, 31, 30, 30, 31, 29, 30, 30, 30],
2098: [17, 31, 31, 32, 31, 31, 32, 30, 30, 29, 30, 30, 30],
2099: [17, 31, 31, 32, 31, 32, 31, 30, 30, 29, 30, 30, 30],
2100: [17, 31, 32, 31, 32, 31, 30, 31, 30, 29, 30, 30, 30]
}
I appreciate the work that has gone into making this. Various locales and all types of calendars. Really cool. I am using moment js for time only - it does not support any calendars I need. Good job.
how to Remove or destroy Calendar from input
Is plugin possible to integrate timepicker?
Using Windows 8.1, when setting the language to Chinese Simplified IE uses the culture zh-hans and not zh-CN, but it seems we don't have that file nor a root zh one. Is there a possibility to get these files in the future?
Setting defaultDate for the datePicker element, fires the select date event (onSelect), when it really shouldn't. Or at least the trigger may be need to send the src of event for us to be able to determine what to do with it.
Good work but not working in bootstrap modal
Regards.
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
I'm using the onDate callback to assign a custom class and the selectable attribute to a given date, depending on some. i.e., I have availabilities (0, 1) for every date and I'm using a range select to allow users to select a 'from' and a 'to' date.
Now I'd like to prevent users from selecting a date range which has 'non selectable' dates (i.e. having a certain class and the selectable=false attribute set).
The behavior should be similar to when a user has a start date selected, all the dates in the past will be disabled for selection.
Would this be a functionality that can be easily added to the plugin? I couldn't find a way of doing this by using the provided callbacks.
Best Regards,
Martin
how to add bootstrap style like that one
In date picker, selectDefaultDate has no effect if it is applied inline, rather than on an input
cannot change day number if hijri doesn't match gregorian calendar
Hello
Nice work would you please release the bower component of your plugin as well
Thanks
Leap year calculation for Persian is more complicated than Gregorian. While the latter is simply every 4 years occurs, the Persian one has 7 cycles of 4 year, then 1 cycle of 5. Suppose we are starting from the first cycle: every 4 years we have a leap year; just normal. But, after 28 years (7x4), having a leap year, this is the end point of 4 year leap cycle. Now, after 5 years we have a leap year, i.e. 33 years (7x4+5) from the start. After this the whole cycle repeats.
As a real date example:
Persian years: 1342,1346,1350,1354,1358,1362,1366,1370 and also 1375 are all leap years.
Corresponding Gregorian: 1964,1968,1972,1976,1980,1984,1988,1992,1997
If you think it is complicated, you are right, but just because of this complication, the Persian calendar is among the most accurate calendars.
Thanks for you truly effort.
Cheers.
Hello,
Is there a clear documentation on how to use jquery.calendars.validation.js?
First, thanks for the great plugin. Second i would like to know how can i convert the CDate[] returned by the datepicker to an actual javascript date.
Regards,
Zaher
Drupal only allows GPL code to be distributed with the modules that contributors write. Code licensed under anything other than GPL must be manually added by end users, and not module authors. Unfortunately doing so is not that easy and is a source of confusion for newbies when their js calendar does not work!
Could you dual license your code under GPL too? As far as I understand, GPL is more restrictive anyway and you will not loose any rights over the code.
I'm trying to override regional options for jquery.calendars.validation.js but this is not possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.