date

Drupal - Views Calendar Theme "Page by date" Navigation Title

I was using Views to display a calendar of events. I then attached a date navigation pager to the calendar. By default, the navigation title was coming out looking like this:

Drupal - Automatically Set "To date" when "From date" Changes on Popup Calendar

With a date field in Drupal, you can specify the 'To date' be the same as the 'From date' on the field settings. However, selecting a 'From date' on a node form does not automatically update the 'To date' to be the same value, and this is usually annoying for our patrons. Let's use some javascript to detect changes on our 'From date' field(s), then automatically set the 'To date' to the same date as the 'From date'.

Place this code in your custom javascript file:

Drupal - Date Repeat Rule Change Theme of "Repeats every day until"

In my use case, the most common date repeat rule used by authors is the "Repeats every day until". For example, an event spanning from October 2012 through April 2013, read something like this:

Repeats every day until Tue Apr 30 2013 .

Date is an awesome module, but this isn't an awesome way to show a date range. Let's change it to something like this instead:

October 5th, 2012 - April 30th, 2013

Looks better, eh? Charming, indeed.

JavaScript Date Time YYYY MM DD HH MM SS

Robot: "What time is it JavaScript, buddy? And when you answer, it better be in the format of 'YYYY-MM-DD HH:MM:SS' in 24 hour format with preceeding zeros on the month, day, hour, minute and second, or else!"

Me: "Relax big guy, just call this function, friend."

Subscribe to RSS - date