Date Field

12 years 6 months ago #179017 by busterocaps
Date Field was created by busterocaps
I posted something similar to this before, and I have to assume that this is a bug of some sort. I'm using a date field on a custom tab. I have my date format set to dd/mm/yyyy. I cannot update this field from the front end, only through the back end. If I try to edit the field from the front end, I get a message that the save was successful but the field remains unchanged. I looked at my database, and the date format is set to &Y &m &d. I had a similar problem using a cb_datefield->store command in some custom script. The only way I could get the field to update is by reconstructing the date to fit into a yyyy/mm/dd format. Changing the CB configuration to any of the yyyy/mm/dd or yyyy-mm-dd formats doesn't work either, it just changes the way the dates are displayed on the front end. So I'm guessing that somewhere in the CB code there is a problem. I believe that CB doesn't check the SQL servers date format before trying to write a date, and that it's being rejected. either that or the CB code doesn't write the date to the database unless it matches the SQL database. but only from the front end. The back end is fine. I've searched the forums and posted about this before, so hopefully this time we can get this issue resolved.

Thanks!

Please Log in to join the conversation.

12 years 6 months ago #179019 by nant
Replied by nant on topic Re: Date Field
If you can replicate this behavior on a clean Joomla 1.7.1 website with just CB 1.7 installed than we will consider this a bug.

Otherwise its something related to your environment and most likely something else you installed is causing problems.

Please Log in to join the conversation.

12 years 6 months ago #179143 by busterocaps
Replied by busterocaps on topic Re: Date Field
Ok, I just did another test. If, in the DB, the date field has a value of NULL, and I go to my front end, and edit and save the date field in the users profile, it saves 0000-00-00 to the DB. That proves that CB is writing that value improperly to the DB. Any ideas?

Please Log in to join the conversation.

12 years 6 months ago - 12 years 6 months ago #179148 by nant
Replied by nant on topic Re: Date Field

busterocaps wrote: Ok, I just did another test. If, in the DB, the date field has a value of NULL, and I go to my front end, and edit and save the date field in the users profile, it saves 0000-00-00 to the DB. That proves that CB is writing that value improperly to the DB. Any ideas?


Actually, this test does not prove anything.

I did same test and yes a null initially date when updated by user profile update but with no date set in the date picker is saved as 0000-00-00 in database.

However a selected date is saved just fine.

The date format does not influence i believe the actual storage of the date in the database - just the rendering.

Please Log in to join the conversation.

12 years 6 months ago - 12 years 6 months ago #179156 by busterocaps
Replied by busterocaps on topic Re: Date Field
I resolved this issue by changing the calender type to popup calender(old) in the CB configuration, further proving this is a CB issue and not related to my installation.I just saw your post, about the SELECTED date. Maybe that's the problem. I changed the calender type to popup(old) in my CB config and the problem went away. Is there something missing from the 'new' calender that gives the selection? I tried checking my profile here to see if the calender function is different but there aren't any date fields in my profile. On my site, using the 'new' calender gives you 3 drop down boxes or the calender. I select the appropriate date portion in each drop down, then click on the update button. I'm guessing there is some disconnect here with that calender that doesn't update the variable, so when you click update CB saves that default value 0000-00-00

Please Log in to join the conversation.

12 years 6 months ago #179171 by nant
Replied by nant on topic Re: Date Field
don't know what more to say - my tests on clean CB 1.7 and Joomla 1.7 websites show no issue.
The following user(s) said Thank You: busterocaps

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.415 seconds