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.107 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started