unnitallman / instantcalendar Goto Github PK
View Code? Open in Web Editor NEWcalendar plugin for ruby on rails
Home Page: http://code.google.com/p/instantcalendar/
License: MIT License
calendar plugin for ruby on rails
Home Page: http://code.google.com/p/instantcalendar/
License: MIT License
Copyright (c) 2009 Unnikrishnan KP, released under the MIT license Instant Calendar =============== Displays a simple HTML calendar. Appearance and behaviour of the calendar is fully customizable. Usage ===== 1. ruby script/plugin install git://github.com/unni123/instantcalendar.git 2. Rails >= 2.0 rake instant_calendar:setup Rails < 2.0 rake instant_calendar:setup_old 3. Restart your application 4. See examples below Example ======= 1.Displays the calendar of current month & year <%= show_calendar %> 2. Displays the calendar of March, current year <%= show_calendar :month => 3 %> 3. Displays the calendar of March, 1985 <%= show_calendar :month => 3, :year => 1985 %> 4. Highlight today's date <%= show_calendar :highlight_today => true %> 5. Highlighting selected dates <%= show_calendar :highlight_dates => [10,15,28] %> 6. Custom text for selected dates. <%= show_calendar :dates => { 5 => "xyz", 26 => "abc" } %> In the calendar, date 5 will be replaced by 'xyz', and 26 by 'abc' 7. Linking specific dates to specific URLs. <%= show_calendar :dates => { 12 => link_to("12","/events/123") } %> <%= show_calendar :dates => { 12 => link_to("12",event_path(123)) } %> <%= show_calendar :dates => { 12 => link_to("Twelve",event_path(123)) } %> 8. Ajax links <%= show_calendar :dates => {22 => link_to_remote("22",:url => "/events/123",:method => :get) } %> <%= show_calendar :dates => {22 => link_to_remote("22",:url => event_path(123),:method => :get) } %> 9. Javascript actions <%= show_calendar :dates => {15 => link_to_function("15","alert('Hello');") } %> <%= show_calendar :dates => {15 => "<span onmouseover=\"alert('Hello');\" >23</span>"} %> Appearance ========== 1. A calendar.css file is generated and used by the plugin (public/stylesheets/calendar.css). Edit this file to customize appearance of the calendar. 2. Width of the calendar is not restricted. It occupies the full width of its container. 3. Every date (rectangle holding each date - table's TD) has a unique ID of the form 'date_1','date_12' etc. This also can be used for extra styling or may be behaviour control with UJS etc. =========================================================================================== Author: Unnikrishnan KP Blog: http://unnionrails.blogspot.com Contact: [email protected] Plugin Homepage: http://code.google.com/p/instantcalendar/ Any feedback/comment/issue/donation is welcome! ===========================================================================================
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.