Closed (duplicate)
Project:
Date
Version:
7.x-2.x-dev
Component:
Date Popup
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 May 2009 at 05:17 UTC
Updated:
29 Nov 2012 at 13:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
brice-dupe commentedNigel,
I was able to get this to work by adding to the Date module's "hook_form_alter". There is NO NEED for jQuery UI and jQuery plugins. Make sure you include the Calendar Popup module that is in the Dates package. Here's what I did specifically:
Edit date/date/date.module
add
to the function date_form_alter() function [@ line 443].
Attached is a patch. You can of course create your own module and hook into alter_form.
Hope this helps!
~ Brice
Comment #2
nigelcunningham commentedThanks for the reply and sorry I've been so slow to notice it. I'll give this a try.
Nigel
Comment #3
nigelcunningham commentedThat works beautifully!
Thank you very much!
Comment #4
csc4 commentedSorry to reopen this - but could I just clarify...
Is this the official answer?
That the module doesn't support this feature any more and that we should roll a custom patch if we still need this functionality? or is it a bug that the feature has gone away? or is there a setting somewhere which needs changing?
Comment #5
robloachStick this in date_popup.module.......
Comment #6
brice-dupe commentedI have noticed that this is skewing the hour published. Whenever I use date_popup as the #type of the node_form .... it increments time published by one hour! You can repeat this by saving a node. Edit it and save (without changing anything). The hour will have incremented.
Any ideas?
Comment #7
robloachMight be your timezone conversion? Might also be unrelated to this issue.....
Comment #8
brice-dupe commentedRob,
Are you able to repeat this?
On my server; timezone is set to American/Kentucky/Monticello. User selectable timezones are disabled.
I have also tried to set Timezone to UTC and it still skews.
The date_popup widget creates two input fields. One to select a date via the calendar popup, and another for the time. The time of day field is quirky. There seems to be some client side code that limits you to typing eoith the hour or second.
Comment #9
seworthi commentedFollowing up on #5 solution, if you also use the "override_node_options" module, you will need to use the following to adjust for that modules 'date' filed changes.
Comment #10
mohanrajthangarasu commentedthat works beautifully. thanks Seworthi
Comment #11
jax commentedsub
Comment #12
jax commentedAfter applying the change in #5 I'm getting the error
warning: mb_strlen() expects parameter 1 to be string, array given in /home/ojacquet/public_html/recticel/includes/unicode.inc on line 407.because the "Authored on" info is no longer sent as a string but as an array:Comment #13
drupalina commentedI have tried codes in both #1 and #5, but it keeps adding 9 hours (same problem as reported in #6). The server is located in USA, but the site timezone is in GMT+4 (I don't know if this could be one of the problems, but the codes in #1 or #5 seem to skip that which Drupal achieves pretty neatly - i.e. respect the time and timezones).
This is very problematic because very often if an article is added in the evening, then with +9 hours the date of the article will change to the next date. This is a really needed feature because people will be manually adding more than 70,000 nodes from back issues and I just wanted to added some sort of date-popup so as to ease their lives. Can someone help or provide an alternative solution, please? I'm sure this is a very needed feature!
Many-many thanks!
Comment #14
sjz commentedI'm experiencing the same problem where the "picker" is not respecting the time zone differential. Too bad to because it would be SO much more user-friendly than the current implementation.
Comment #15
Mac Clemmens commentedIs there a way to adjust the input from this form element +/- the user's timezone?
Comment #16
drupalina commentedRegarding #6 and #13 I've managed to resolve it by setting up the site timezone in .htaccess file. At the vey begining of it I entered:
SetEnv TZ :Europe/Pragueand now the date popup solution from #5 no longer messes up the time and dates.But in my watchdog logs I still get a PHP ERROR
mb_strlen() expects parameter 1 to be string, array given in /home/example/www/www/includes/unicode.inc on line 404.Any solutions for this string/array php error???
Comment #17
ianchan commentedsubscribe
Comment #18
ckidowsubscribe
Comment #19
skilip commentedThe 'mb_strlen' error is caused by the '#maxlength' property. Unset it.
Comment #20
nigelcunningham commentedThe patch in #9 works for me without timezone issues or errors in syslog.
Comment #21
grandchamp_g commentedI've tired both #1 and #5 and neither seem to work, it changes the field by making it shorter and allowing only the short date format I have setup as input. But there is no pop-up. Can anyone help me? What am I doing wrong?
Comment #22
barrapontopatches published as a module in http://drupal.org/project/date_popup_authored, but i suppose it is still prone to the same issues reported here...
Comment #23
mark trapp@barraponto When I rolled the date_popup_authored module, I did look through the issues here to see if there was things that could be addressed. However, none of these issues are actually caused by the patch/module: #6, #8, and #14 are all related to timezone issues outside the scope of the patch/module, whereas #16 is related to missing one of the lines necessary for the patch. From my testing, if your timezones are properly configured, the patch (and the module) should work just fine.
Comment #24
lee20 commentedsubscribe
Comment #25
mark trappI identified the timezone problems you guys have experienced and have fixed this in 6.x-1.0-beta2 of Date Popup Authored (see: #847854: Timezone handling is poor to non-existent.). If you don't want to use the module, here's the modified code:
Comment #26
h2odigital commentedComment #27
mark trappComment #28
klonos...coming from #1562798: Its hard for users to provide valid input in the authoring date field (which is an issue filed against D8 core). There is no action here for more than two years now. Let's see if we can get this moving by assigning it to the latest dev of D7.
Comment #29
barrapontodate is in core. is the picker in core? should we move this issue to core's queue?
Comment #30
klonosWe already have #504524: Extend Authored on field with jQuery UI Date Picker that recently was marked as a duplicate of #1835016: Polyfill date input type.
Comment #31
barrapontoAs explained in #30.