Hi,
I've banged my head against this for a while until I realized that there is a bug in Date Popup. So here it is:
I have a view which lists nodes with a CCK Date field "Available from". The exposed filters are in a Block (to achieve this, in Views just say "Yes" to "Exposed form in block" and this will create a separate block were the views filters will be displayed). My filters block doesn't have an "Apply" button, so that views results are getting narrowed down on the fly as people select their preferences.
One of these filters is the "Available from" date filter, set to "Is greater than or equal to" and the Absolute value is not set. The "Date default" is set to "now" and "To date default" is left empty.
Optional = tick.
Remember = tick. (and by the way, it doesn't remember anything, whatever you do, but that's a separate issue)
In the settings for that exposed Date filter, I have:
Date form type = *Popup* (AND HERE IS THE PROBLEM!!!)
Granularity = Day
Date year range = -1:+5
Date filed(s) = tick on only "Content: Available from (field_availability)"
Method = OR
As a result, whatever date you pick, nothing changes in the views. BUT the moment that you switch to "Select" mode in that filter's settings (instead of "Popup") -- everything begins to work as a charm.
So the problem it seems is that the Popup doesn't pass the correct values/tokens to the URI, but it could be some other issue as well.
Any ideas on how this bug could be corrected so that I could have a decent Available From filter with a Popup???
Comments
Comment #1
elvis2 commentedI can confirm this issue too. In my case, we built an exposed date form within views, with date 6.x-2.6. Then migrated the view to a site that had date 6.x-2.7. The field no longer has the popup. If you look in the page source, the jquery datepicker is not being loaded at the bottom of the html source. jquery, jquery_ui, and views are the same versions on both sites. Just the date module is different.
Comment #2
elvis2 commentedI found my problem. On the dev server I was calling my exposed view form (see example below) in template.php. On the live server I pushed the same code into my page-custom.tpl.php and removed it from template.php.
I used the following in template.php to load the exposed form properly.
My assumption is the date popup datepicker js doesn't load if this view is called from a tpl file.
Comment #3
karens commentedUnable to reproduce any problem using the latest dev code. If there's a problem there reopen with steps to reproduce.