Software Archive
Read-only legacy content
17061 Discussions

Add event to HTML5 Calendar

Dominic_Ü_
Beginner
312 Views

Hey we started a project at our school. Therefore we need a calendar which only uses HTML5, CSS and JS. So no cordova plugin allowed.

I downloaded this calendar: https://designsmaz.com/freebies/html5-css3-and-jquery-calendar-date-time-widget/

After that I copied all files into my XDK project. The calendar shows up but I don't know how I can add events with this thing. In the clndr.js I read the comment "this is the plugin constructor". So do I need to install the plugin or should it work just by copying the files to my project?

Thank you.

0 Kudos
4 Replies
Pamela_H_Intel
Moderator
312 Views

Dominic,

If the files contain all the code necessary to create what you need, then you don't need additional code (i.e. a plugin). But if the code you have calls a function in a plugin API, then you need that plugin. I looked at the site. It's marketed as HTML5 . . . sounds like it doesn't require any additional code . . . but I am not familiar with that particular code.

One thing you may run into is that jQuery1 no longer works well with Cordova (XDK apps are built with Cordova). Make sure you are using jQuery2.

Pamela

0 Kudos
Zhen_Z_Intel
Employee
312 Views

Hi, I have quickly scanned the source code of the HTML5 calendar. Please notice the index.html file, there is no any event for each option of the drop-down list. You have to write functions and bundle these events to each option by yourself.

 

0 Kudos
Pamela_H_Intel
Moderator
312 Views

Dominic,

I haven't looked at the code myself, but Fiona says the events aren't there. So it sounds like you do need to implement them yourself.

Pamela

0 Kudos
Zhen_Z_Intel
Employee
312 Views

Hi, there is no any function of adding an alarm, you have to implement by yourself.

0 Kudos
Reply