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'm trying to get the dates to show in a View, but it is showing up blank. Seems to only affect the date fields as the name and email showed up fine.
I followed the instructions from both the video and documentation.
Video: https://vimeo.com/18701843
Documentation: https://www.drupal.org/node/2180607
Anyone have clearer directions?
Looking to create a calendar with the date inputs from a webform.
Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#10 | date_test2.viewexport.txt | 6.58 KB | joep.hendrix |
#10 | 2017-06-02_10-01-44.png | 34.79 KB | joep.hendrix |
#10 | 2017-06-02_10-01-22.png | 44.95 KB | joep.hendrix |
Comments
Comment #2
Piratawww CreditAttribution: Piratawww commentedSame problem here.
Comment #3
joachim CreditAttribution: joachim commented> Looking to create a calendar with the date inputs from a webform.
Then you need webform's views support, not this module.
Comment #4
Piratawww CreditAttribution: Piratawww commentedMy date fields come empty from any table (i dont use webform views)
Comment #5
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedSame problem here.
If the type is datetime then blanks. When INT it works fine.
Comment #6
joachim CreditAttribution: joachim commentedHave you set up the correct Views field handler for your data entity?
Comment #7
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedYes, in the view it is reconized as a date field (i can set the formats).
However, the output is blank.
When the field is an int (like node created), it works fine.
Comment #8
joachim CreditAttribution: joachim commentedIt could be the underlying format in your table isn't compatible with the handler.
Can you debug in the handler class to see what's going wrong?
Comment #9
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedthe table field is of the datetime in Mysql.
I will try to debug.
Comment #10
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedHere is my test case:
Test table definition
Attached the view definition and screenshots of the settings.
When debugging views_handler_field_date->render the values are never converted to timestamp (except for timestamp field). The call format_date($value, $format, '', $timezone) will return blank consequently.
I hope this helps.
Comment #11
joachim CreditAttribution: joachim commented> When debugging views_handler_field_date->render the values are never converted to timestamp (except for timestamp field).
What should be converting them to a timestamp? Does views_handler_field_date expect a timestamp?
Please bear in mind that it's been years since I worked on this code, and I don't have enough free time to set up an instance and debug it. You should use Devel module to debug the code to figure out why things aren't behaving as they should.