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

TOPIC:

Validation of date in search field 02 Oct 2012 06:55 #4208

  • Ferm
  • Ferm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 6
Not a big problem, but I noticed that if you drag a date field to a search box (or range in my case), and then enter an invalid date like '123' in the search filed, the application crashes with the following message (both in sandbox and locally):

500 - DateTime::__construct() [datetime.--construct]: Failed to parse time string (30-11-99) at position 7 (9): Unexpected character

I added code to set the date to null if the input is invalid but it owuld be great to have this in the JDom library.

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

Re: Validation of date in search field 02 Oct 2012 08:15 #4210

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Not really an answer as such but, I suppose the the most desirable way of handling this would be if the range would adhere to the format of the field it is working with - i.e. in the case of a date/datetime field, providing the calendar type input. This would allow users to pick a date from the calendar.

Not quite sure how to go about modifying this as such but, I'm sure that there are some fellow cooks who could propose some files to change...

Anybody...?

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

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

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

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started