Working with date field

yorguey31's picture

Despite reading some documentation and looking to google on this subject i don't achiev to do the job ...
severals thing dont' goes well :
1)
$wrapper->my_date_field->value()
gives me a timestamp and not a datetime object.
2)
i can't find a way to get the value2 in my field
$wrapper->my_date_field->value2
$wrapper->my_date_field->value2->value()
$wrapper->my_date_field['value2']
$wrapper->my_date_field['value2']>value
doesn't work.
3)trying to set the date is a problem too
$wrapper->my_date_field->set()
$wrapper->my_date_field->value->set()
doesnt work :Unable to get a data value. Error: Unable to set the data property value as the parent data structure is not set.

Does someone has done this before ?

Comments

Need more details about the issue!

samcis's picture

Well, have you ever used the submodule "Date Popup". I think it helps in providing a jQuery UI pop up widget for date fields. it might not be that easy.

I'm not currently aware of any pre-boxed modules that would help here..

Need more details. What modules, what Drupal version, etc?

Entity API

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week