Author Topic: Default value for date field  (Read 123 times)

p.barg

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 136
    • Barg IT
Default value for date field
« on: November 10, 2017, 11:07:39 am »
Hello,

I wonder if there is a way to specify a default value for a shopper field of type date?

-- Petra

Jumbo!

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 605
  • Software Developer {PHP, JavaScript, jQuery, ...}
    • www.virtueplanet.com
  • VirtueMart Version: 3.2.4
Re: Default value for date field
« Reply #1 on: November 11, 2017, 15:19:42 pm »
Yes, you need to set the default value in SQL Date format. Example: 2017-11-11 19:49:41

However, please remember that you can not set the field as "required" when you set a default value. That may create issues during form validation.

p.barg

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 136
    • Barg IT
Re: Default value for date field
« Reply #2 on: November 15, 2017, 09:39:54 am »
Thank you  :)