GithubHelp home page GithubHelp logo

calendars's People

Contributors

kbwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calendars's Issues

Having a "defaultDate" fires a select event

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.

zh-hans and/or zh root missing

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?

Uncaught TypeError: year.calendar is not a function

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 ?

Nice!

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 use validation

Hello,
Is there a clear documentation on how to use jquery.calendars.validation.js?

prevent range selection with not selectable dates in between

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

inline Persian calendar seems squeezed

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

False leap year calculation for Persian calendar

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.

Calendar.parseDate is not parsing when language is vi and dateFormat: yyyy-M-dd

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.

GPL License

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.