Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
I am not able to get this working in Views 7.x -3.5, I ve enable the views submodule but I can t find any settings in an exposed date filter, either on the filter or in the exposed form.
Also, in which way is this different from the Better Exposed Filter date picker (which also do not work properly) module?
Thanks
Simone
Comment | File | Size | Author |
---|---|---|---|
#16 | datepicker-autosubmit-1779960-8214129-16.patch | 1.44 KB | lauriii |
#15 | datepicker-autosubmit-1779960-8214129.patch | 2.12 KB | hoter |
Comments
Comment #1
mstrelan CreditAttribution: mstrelan commentedThere are 2 ways to create date filters in views. One is to create a filter for the specific field you want, the other is to add the generic Date filter (provided by the date_views module), which then allows you to specify the field that the filter is associated with. Not sure if that makes sense, but if it does can you check which type of filter you have? I think you'll need to use the generic date filter. Hope that helps.
Comment #2
cimo75 CreditAttribution: cimo75 commentedHi
thanks yes i ve found it now still it doesn t work.
If autosubmit is off (but this doesn t make too much sense in a date picker) it works once then the date picker disappear and the normal date form is there.
If autosubmit is on, then it does not work at all, i can click on the dates but nothing happens
I hope we can make this work somehow, finally a proper way to filter dates!
Something else, a bit off topic, how can I filter a from-to date? I am only given the possibility to chose among OR or AND
Simone
Comment #3
mstrelan CreditAttribution: mstrelan commentedHi Simone,
You can't really assume whether or not it make sense to have autosubmit on or off. The project that this module was built for has a series of filters, such as "event type", and using autosubmit would only let you change one filter at a time before waiting for the results to reload.
Datepicker does not work with auto-submit. If you need that functionality please submit a new feature request.
You should open a new support request for this, but I'll answer it anyway. If you want two calendars, ie. to filter between 2 dates, then the final step of adding the filter should give you the option of using "between" as the operator.
Does that help?
Comment #4
cimo75 CreditAttribution: cimo75 commentedHi
yes you are right about the auto-submit but I ll send a request, cause it would be better if that was functional too, there was some patching to be done in ctools to get it autosubmit with special filter widgets
Still, when I don t use auto submit it does work only one time, then the picker disappear and I am left with the date text box.
I don t want to filer among 2 dates but filter a single date (single picker) with a reference FROM - TO date field (date range)
tx
Simone
Comment #5
mstrelan CreditAttribution: mstrelan commentedCan you provide screenshots or something? I'm not experiencing the same issue. Does it disappear after hitting submit? Have you got "Use AJAX" enabled?
Probably needs to be another feature request, although I'm not quite sure how I'd go about implementing this. I was going to suggest using http://drupal.org/project/views_filters_populate which would work quite nicely, except it only gives you a textfield.
Comment #6
cimo75 CreditAttribution: cimo75 commentedHi
ok I ll post in the Date issue queue about the FROM - TO date filtering (and link here) so we don t drift away..
About this issue, a screenshot, wouldn t say too much, but yes ajax is enabled, it filters once, then it defaults back to a normal date box (as if java was disabled)
Simone
Comment #7
mstrelan CreditAttribution: mstrelan commentedDatepicker is the only Drupal module I've seen that allows users to add an inline datepicker, ie. the calendar is always displayed, you don't have to click a textfield first. FWIW I just tried Better Exposed Filter and had no issue using the datepicker functionality of that module with AJAX enabled, although autosubmit doesn't work. Autosubmit seems to rely on keypresses, so clicking doesn't trigger it.
I can confirm this now. Disabling ajax and autosubmit should do the trick.
Patches are welcome if you want to try adding support for ajax and/or autosubmit.
Comment #8
cimo75 CreditAttribution: cimo75 commentedHi
i have it in a block, I disable Ajax as you suggest and :
Exposed filters in block displays require "Use AJAX" to be set to work correctly.
That makes sense as it probaly can t access the necessary scripts in a block.
About the ajax/auto submit that s somthing that needs to addressed in Ctools, there are already a few posts about it.
Which version of Date en BEF are you using?
tx
S.
Comment #9
cimo75 CreditAttribution: cimo75 commentedHi
I cna confirm that it works in a page, i see it is updating the URL but is the date picker actually using the URL to filter as an argument? That would make sense for the date picker not to work on a block. Not an expexted ajax behavior though.
S.
Comment #10
jberube CreditAttribution: jberube commentedI have a view with AJAX enabled and when I update the filter, the view updates but the widget gets duplicated.
I was able to fix this by changing line 10 in datepicker.js
from:
to:
Comment #11
mstrelan CreditAttribution: mstrelan commentedcimo75 - does #10 fix your issue?
jberube - I would prefer something like this, can you test if that works for you?
Comment #12
cimo75 CreditAttribution: cimo75 commentedNo, none of the 2 solutions work for me :(
S.
Comment #13
RAFA3L CreditAttribution: RAFA3L commentedAny news?
Would be nice get it to work like this
http://www.imamuseum.org/calendar
Comment #14
hoter CreditAttribution: hoter commentedAs I understand auto submit doesn't work because datepicker not trigger an event "keyup" for a textfield. I attached a patch that fixed this issue for me.
Comment #15
hoter CreditAttribution: hoter commentedComment #16
lauriiiI did some mino fixes; created the patch in the module folder and made selected date as default date.
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedThe
Drupal.ajax.prototype.commands.settings
bit causes a javascript error for me. I removed it from my patch and everything works as expected. What does it do?Also, when I enable AJAX even with the patch (from lauriii), pressing the dates doesn't work. I only get an error
Uncaught TypeError: Cannot read property 'top' of undefined
inajax_view.js
.Comment #19
mstrelan CreditAttribution: mstrelan commentedHave committed a fix for this to dev. Please re-open if it doesn't work.