Hi everybody,
Here is my problem...
When I load datas in a form, I have the date of the day in my date field...
...and I don't know why 🙄 😀 :mrgreen:
Here is my problem...
When I load datas in a form, I have the date of the day in my date field...
...and I don't know why 🙄 😀 :mrgreen:
Hi Rastatom ,
There's an option for the datepicker that you can set to have it show an empty input allowEmpty: true
Bob
There's an option for the datepicker that you can set to have it show an empty input allowEmpty: true
Bob
Hi GreyHead,
I have try this option but it doesn't work... (in datepicker.js)
The date of the day is loaded in the fields, although there is another date in the database.
In phpmyadmin, the type of the field is "date" but when I saw in CF, the type of the field is "varchar"...
I don't know if it's the problem...
I have try this option but it doesn't work... (in datepicker.js)
The date of the day is loaded in the fields, although there is another date in the database.
In phpmyadmin, the type of the field is "date" but when I saw in CF, the type of the field is "varchar"...
I don't know if it's the problem...
Hi Rastatom,
You can configure the DatePicker options in the DateTime Picker config box on the Form General Tab (click the Form Name link in the Forms Manager to see it).
I don't understand whay {PHPMyAdmin and CF would show different types for the same column; that sounds wrong. They are both reading the same data from the database.
Bob
You can configure the DatePicker options in the DateTime Picker config box on the Form General Tab (click the Form Name link in the Forms Manager to see it).
I don't understand whay {PHPMyAdmin and CF would show different types for the same column; that sounds wrong. They are both reading the same data from the database.
Bob
I think that datepicker is the problem....
Is it possible to put a datetime box in a form loader?
Is it possible to put a datetime box in a form loader?
Hi rastatom,
Err . . . yes . . . but I'm not sure I understand the question any more?
Bob
Err . . . yes . . . but I'm not sure I understand the question any more?
Bob
I try to explain better....
I don't find the way to load a date from my database in a Datepicker field.
It's load the date of the day (although there is another date in the database).
I put "allowEmpty: true" in "DateTime Picker selector" field but nothing different happen.
I don't find the way to load a date from my database in a Datepicker field.
It's load the date of the day (although there is another date in the database).
I put "allowEmpty: true" in "DateTime Picker selector" field but nothing different happen.
Hi rastatom,
If the database column is type = DATE then the inputOutputFormat need to match i.e.'Y-m-d'
If these match up then the ChronoForms republish or DB Load 'should' work OK.
Bob
If the database column is type = DATE then the inputOutputFormat need to match i.e.'Y-m-d'
If these match up then the ChronoForms republish or DB Load 'should' work OK.
Bob
Anyone have a solution for this problem?
Recorded date : 2011-06-30
Loaded date : 2011-06-14 (date of the day)😑
Recorded date : 2011-06-30
Loaded date : 2011-06-14 (date of the day)😑
Hi Rastatom,
I've started to test this. So far all looks OK:[list]I created a new form with just a date-time picker and a submit button. I used the default settings.
I created a table setting the date-picker column to type date.
I added a DB Save action to the form and linked it to my new table.
Checked that the form saves data to the table with the Y-m-d format. All OK.
Added a DB Record Loader action to the OnLoad event of the form and linked it to the same table. I set the DB Field and the Request Param both to 'cf_id' (the record id).
I load the form using the form URL plus &cf_id=2 and the date loads correctly.
Saving the form from this URL updates the database to the amended date.
I add format: 'm/d/Y' to the DateTime Picker config box. The date now displays as e.g. 09/22/2012 but is still saved in the database table as 2012-09-22 [/list]
So far all OK.
[list]I removed the entry from the DateTime Picker config box and dragged a Custom DatePicker action from the Utilities action group into the OnLoad event and moved it before the Show HTML action.
Added the class 'mydates' to the datepicker element and the Custom DatePicker action to link the two. Turned the time picker option off.
Check that the data format has returned to 'Y-m-d' and is still saving correctly. All OK.
Change the Display format to 'D d M y' and check that the date now displays as e.g. 'Fr 22 Jun 11'. The data is still saving correclty in the database in Y-m-d format. [/list]
I hope that this helps a bit.
Bob
I've started to test this. So far all looks OK:[list]
http://frances/Joomla1.6b/index.php?option=com_chronoforms&chronoform=test_form_4&cf_id=2
So far all OK.
[list]
I hope that this helps a bit.
Bob
Thanks a lot Bob !!!!!!
The problem was from the type of the column...
I have to put the type "DATETIME" and not "DATE".... 😶
Can you do a last test for me? 😶
1.Record a blank date (don't sectect a date, just press the submit button)
2.Load this record in the form
Does it load a date? For me, it's the date of the day.
The problem was from the type of the column...
I have to put the type "DATETIME" and not "DATE".... 😶
Can you do a last test for me? 😶
1.Record a blank date (don't sectect a date, just press the submit button)
2.Load this record in the form
Does it load a date? For me, it's the date of the day.
Hi Rastatom,
That's because the default setting for the date field is to load the same date of the day, you may override this by using a "Custom datepicker" action under the "Utilities" category, then you can select whether the field should be defaulted to empty or not.
Regards,
Max
That's because the default setting for the date field is to load the same date of the day, you may override this by using a "Custom datepicker" action under the "Utilities" category, then you can select whether the field should be defaulted to empty or not.
Regards,
Max
Ok Max, I try this...
Otherwise, I have put the type VARCHAR and the problem was solved.
Otherwise, I have put the type VARCHAR and the problem was solved.
This topic is locked and no more replies can be posted.