
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
=== WHAT THIS PLUGIN DOES: Allows the user to create a DHTML pop-up calendar and an associated text-box that displays the selected date using 1 Rails function from within a .rhtml file.
=== INSPIRATION: Like all the other good calendar plugins, Calendariffic relies on the heavy-lifting performed by the Dynarch DHTML calendar (http://www.Dynarch.com/projects/calendar/).
=== LICENSE: As Calendariffic is simply a rails extension of the Dynarch calendar, it is released under the same license as that of the Dynarch calendar (i.e. the GNU General Lesser Public License, http://www.gnu.org/licenses/lgpl.html).
=== BACKGROUND:
The Rails community needs another Ajax Calendar plugin like I need another hole in my head.
Fortunately for all of us, my Colt .45 single-action Peacemaker just arrived from Ebay, complete with bullets.
Okay okay, there were a handful of questionable reasons for building this plugin.
=== PLEDGE: So Here's my Plugin Pledge.
=== HOW TO INSTALL THE PLUGIN:
=== HOW TO USE THE PLUGIN:
Identify the .rhtml file that will display the Calendariffic calendar. Let's say this file is called myrailsview.rhtml.
You then need to include links to 3 Dynarch calendar javascript files which the plugin has installed in your PUBLIC/javascripts/calendariffic directory. These 3 files are called 'calendar.js', 'calendar-setup.js', and 'calendar-en.js'. The easiest way to do this is to use the rails function javascript_include_tag.
e.g. your myrailsview.rhtml file might have this in the section:
<%= javascript_include_tag 'calendariffic/calendar.js', 'calendariffic/calendar-setup.js', 'calendariffic/lang/calendar-en.js' %>
Some things to note:
The Calendariffic file, calendar-setup.js, is a slightly modified version of Dynarch's calendar-setup.js file.
Specifically, it has 1 more function (called set_cal()) that is used to facilitate calendar creation.
So don't try replacing Calendariffic's calendar-setup.js file with the equivalently-named Dynarch file.
The calendar-en.js file is located in a subdirectory named 'lang'.
The calendar-en.js file sets the language associated with the calendar to ENGLISH.
There are MANY different language-specific javascript files located in the lang directory, so you can choose whichever is suitable for you.
You MUST include the relative path to each of the 3 javascript files in your javascript_include_tag function (i.e. don't just write javascript_include_tag 'calendar.js' instead, write javascript_include_tag 'calendariffic/calendar.js'
To specify the look-and-feel of your calendar pop-up, you now need to include a link to your favorite Dynarch calendar css file.
There are 10 different looks-and-feels to the standard Dynarch pop-up calendar and they are located within the rails directory public/stylesheets/calendariffic
The standard method to reference 1 of these .css files in your .rhtml file is to add something like this to your tag: <%= stylesheet_link_tag 'calendariffic/calendar-win2k-cold-1.css' %>
Here's where you add the DHTML calendar. Add this (or something similar) to the portion of your .rhtml file
at the point where you want your pop-up calendar to appear:
for example
<%= calendariffic_input(false, 'start_date', 'calendariffic/date.png', 'start_cal', '%m/%d/%y', nil, {:class => 'myfavoriteclass', :readonly => 'true'}, {:class => 'borderless'}) %>
will yield the following HTML
<input type="text" name="start_date" id="start_date", value="" readonly="true" class="myfavoriteclass" />
Details of the syntax for the calendariffic_input function are given in the rdoc.
Note that you MUST supply a value for text_name and a different value for image_name for the pop-up calendar to work
Once you've added your calendariffic_input function to your .rhtml file, you're done.
You now have a calendar icon that can be clicked on to pop-up a calendar widget.
Once you select a date from the calendar widget, it will be displayed in your custom build text-box.
FAQs
Unknown package
We found that calendariffic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.