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.082 seconds

Hi All just wanted to add one more "thank you" voice to all those who discovered the value of this amazing application. The website I was working on went to production few days ago and I do not want to even try to imagine what would it take to build it without j-cook. So - endless thanks keep it running and evolving I believe it deserves to be the core tool for any joomla application! Thanks!
Michael (bmk028 - Forum)  

Get Started