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

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started