Datepicker attribute only shows 1960-1980 and defaults to 01-01-1970
I have strange issue where I print an event date using a date/time attribute and it seems to default to 01-01-1970. Upon closer inspection I see that the date/time picker only gives me a year choice between 1960-1980 so there is obviously something wrong with my setup.
I have set the following in the config/site.php
Any help would be greatly appreciated.
If you initialize the datepicker with a "0" you'll probably get that date since it's the start of the unix time. For quite a few applications 1-1-1970 means "no date". That's certainly a bit counter-intuitive but it's the way it is.
I doubt it's because of the configuration you've made. However, to be sure I'd recommend to comment all the constants you've posted. If it doesn't change anything, you know the problem is probably located somewhere else.
If that's the case, can you explain where exactly it fails? What screen, what object...
31 January 2013 it saves in the database 01.01.1970 because for it it doesn't exists a date
where 31 is the month.
Yes maybe a configuration of the local, where we put for example day - month instead of month - day
but date picker show us these control forms where we can put these values in correct way.
I'm right now trying to solve and looking up the behaviour of date picker and the point of elaboration of the date.
Maybe it helps in your case too
Good news for me ! :)
Thank for your reply, after searching in this forum and on the web I resolved by my self simply defining on my site.php :
Date picker shows me calendar, let me choose the correct data (also a data of a years ago, I'm importing old blog posts) and prints in the little field the data in format of local that I defined, but saves it in the format of yy-m-d, the format of SQL field in the table.
Finally seems it works good, reading and writing dates :)