Jump to content

Custom date field


eam

Recommended Posts

Hello,

 

I added a custom date field to the Products table. Both the Admin and the FrontEnd display the field, but there is a problem regarding the input format in the Admin page.

 

In the Admin's Informations.tpl, I added the following : 

{
   include file="controllers/products/textarea_lang.tpl" languages=$languages
                 input_name='my_date'
                 input_value=$product->my_date
}

Of course, it results in a text field rather than a date field. How do I display a date field instead?

 
Also, and I don't know if it is a simple consequence of having a TextArea, but when I try to save my field's value 'as is', ie: as it appears it the database (for instance: 2014-02-02), I get the following error (translated into English, might not be the actual English phrase) : 
 
2 errors 
  1. my_date field (Français (French)) is invalid.
  2. my_date field (English) is invalid.

 

What do I need to do regarding the date format so that I can save the date field ?

 

Thanks for your help.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...