14 Posts
vtikas
10 years ago
4
Topic
Hi to all, I am having a problem with datetime field. It does not save the value in the database.
I create a new field of type calendar and save it to Standard|Article|MycolumnnameinDB. I see in the database that its type is varchar 255 by default and when i choose a date and hit save, I get 0000-00-00 00:00:00 in DB. Changed type to datetime, but still getting 0000-00-00 00:00:00 on save. (all construction variables are default: Format Y-m-Y, COM_CCK_Date_Range All, etc).
Could you please help me? It is driving me crazy...
Get a VIP membership
10 years ago
3
Level 1
Hi vtikas,

Try to add "Article Created" field in your content type. This field is native with the installation of SEBLOD.
If this field works fine, please use its configuraion in the definition of your new calendar field.

Regards,
Mehdi.
14 Posts
vtikas
10 years ago
2
Level 2
Thank you for your reply. I added 2 fields to my existing content type. One Article created (as you suggested) and one Article Modified. Both of them, as I see now, are type PLG_CCK_FIELD_calendar_LABEL2 .
The Article Created works ok.
The Article Modified stores only zeros (0000-00-00 00:00:00).
My original field stores only zeros.
I copied all settings from Article created to my field (checked also the DB - same types, same everything) and still I store only zeros. This field was working fine untill 5 days ago.
And something more on the frontend my users cannot open the calendar window to choose a date. It works only on the backend.
Thanks in advance.
10 years ago
1
Level 3
Hi vtikas,

In order to create your specific calendar field with its specific storage, you:
  1. should click on button + in the "form" view of your content type
  2. should select "canlendar" field.
  3. should fill it's specific title and name
  4. should have the same configuration of field "article created"
  5. should define a specific storage setting like : "standard -> article -> date" (for example).
Regards,
Mehdi.
14 Posts
vtikas
10 years ago
0
Level 4
Hi, I did not find a solution finally and had to grant access to users to backend for article submission. Thanks anyway.
Get a Book for SEBLOD