• Resolved thisisjohnb

    (@thisisjohnb)


    Just got the plugin and it looks PERFECT!

    I just can’t seem to get it to take the start/stop times for a task.

    Repro steps:
    1. on a new sheet I add a few tasks and simply select start and stop times from the fields’ autosuggest.
    2. Click “Save”

    Observed behavior:
    the page is reloaded with the form validation error messages for each time field
    Invalid time format for time_start
    Invalid time format for time_end

    I tried different formats but the form forces it’s own format. For example: “1:30pm”

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    Sounds like you have some other plugin that is loading a script globally on the admin side that is applying something to inputs with the “timepicker” class that is overriding the way the timepicker script I’m using is trying to format those times.

    When validating, my plugin expects the time to be in the format:
    XX:XX YY
    needs to see two digits for hour and minutes, a space, and then AM or PM (can also be am or pm). So 1:30pm should actually be 01:30 PM.

    Some other plugins’ script is changing that on your system, so it’s not passing validation. I assure you it’s working just fine here, and nobody else in the over 2000 active installs have reported any similar issues.

    That timepicker script that I use is a jquery ui plugin from another developer, and the version I have in my plugin is the latest version (it’s simple and has not been updated for a long time).

    You’ll have to figure out what other plugins, or possibly even your theme, are using some similar type of timepicker script on their admin pages to figure out where the conflict is.

    Not much I can do about it unless I rewrite my plugin’s code that displays that form, along with the corresponding javascript, and change my class names to something that hopefully nobody else is using globally. Better solution would be to have the other plugin (or theme) only queue up that script on its own pages instead of globally (although, I’m guilty of doing that myself in some of these plugins… it’s a common thing).

    Thread Starter thisisjohnb

    (@thisisjohnb)

    Awesome! I’l search the site’s code for the offending plugin.

    BTW – today I looked over the collection of plugins you developed and was very impressed.

    Thank you for your quick and thorough response and all your work.

    John

    Plugin Author DBAR Productions

    (@dbar-productions)

    Note that to avoid these type of conflicts, I renamed my timepicker script and the classes for my timepicker fields to something unique in version 3 (prefixed by pta-). However, other developers should still avoid adding their scripts to every single admin page globally, which would help us all and make things load quicker!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Invalid time format for time_start”’ is closed to new replies.