Hi,

I want to construct a block that will display only the jCalendar Popup. But whatever I do I can't get the block views to display the setting "Date changer: Yes". It seems to be available only to calendar pages and not blocks.

Is such JCalendar Popup block currently possible? If yes, please help.

If not, then I guess this is a feature request. (it would also be cool if the page would start redirecting instantly as soon as the date has been selected, rather than clicking "Change date" button)

(I'm trying to build a very minimalist archive block, so that when people select the date of publication they are immediately take to it. jCalendar Popup is a perfect tool for this, if i can get it to work correctly)

thanks a lot!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

choster’s picture

You'd have to rewrite the Javascript behind the popup, the code for which is generated on the fly, to insert the node data in a block instead of in the popup using the DOM. More specifically, in jcalendar.js, instead of appending the new div element to the body you could insert it in the right place, then comment out the location/offset setting code.

drupalina’s picture

Hi chooser,

Sorry, I didn't understand anything (because I'm not a coder). Are you saying I should copy the jcalendar.js code, modify it and paste it into a new custom block?
If yes, would you be kind enough to post here the modified code that I need to paste into that block?

Thank you for your help!!!

sebljun’s picture

FileSize
27.97 KB
1.17 KB

I also needed this functionality and have made a very simple module.

Before using this module it has to be edited a bit:

  • You need to change "kalender/$date" to "your-calendar-view-path/$date"
  • The date format has to be edited in two places from 'Y-m-d' to whatever format you want to use in the picker and the format you use in your view url.
  • The .module file is commented where these changes has to be made.

Before using this module you should know that this is my first attempt at making a module and that I'm not very experienced in PHP.

There is one problem I'm aware of with this module except the need for manual editing. It defaults to the current date instead of that of the views page you're on or the datefield of a node. If anyone knows of a good way to get those dates from views and date-fields please edit the files or give me some pointers.

sebljun’s picture

FileSize
1.16 KB

Sorry, the first upload won't work since I forgot to rename a site-specific function. Here's a new one that should work.

AndyF’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one, thanks.