Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] Date format - Invalid Value on Null 13 May 2012 08:14 #2326

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
If i have a calender field with no value to start withso it uses null, so 0000-00-00 (%Y-%m-%d).
But as i want to have my date to use a %d-%m-%Y format, if i want to save the form without entering a value for the date, it gives me an incorrect value.
Two stupid solutions are to ask the user to clear the calendar field prior to saving, and the other one is to kill the validator.
How could i state that the null value for a %d-%m-%Y formatted date field should be 00-00-0000 ?
Thanks,

Please Log in or Create an account to join the conversation.

Re: Date format - Invalid Value on Null 13 May 2012 11:57 #2332

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
looking at /administrator/components/my_component/tables/my_table.php, i see :
if ($XXX === null)
{
JError::raiseWarning(2011, JText::sprintf("XXXX_VALIDATOR_THIS_DATE_DOESN_T_EXISTS_IN_THE_CALENDAR", JText::_("XXX_FIELD_XXX")));

$valid = false;
So i guess that's where it happens... Now let's see what i can do about it...

Please Log in or Create an account to join the conversation.

Re: Date format - Invalid Value on Null 26 Jun 2012 11:19 #2675

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.
Coding is now a piece of cake
The following user(s) said Thank You: VeCrea

Please Log in or Create an account to join the conversation.

Re: Date format - Invalid Value on Null 26 Jun 2012 19:32 #2688

  • VeCrea
  • VeCrea's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
Thanks

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.056 seconds

Really great Joomla tool Cook is a great piece of kit for creating Joomla components. It uses a drag-n-drop interface to build tables and fully featured pages. You can test your component in a sandbox before downloading it packaged up ready to install. The developer is responsive on the support forum.
Twev (JED)
          

Get Started