Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #526

      the date-picker field returns “false” as a value after saving if i leave the field blank

    • #532

      hi, anyone have a solution for this issue ?

    • #533
      James Mc
      Member

      Hi,

      If I have a chance tonight, I’ll try and find what the best approach to fix this might be.

      I have confirmed this behavior when a datepicker field is in the post_meta scope. The datepicker does not do this when in a settings page/tab.

    • #535
      James Mc
      Member

      The problem is located in the /parts/js/pik.js file.

      The following code:

      switch (field.type)
      {
      case 'datepicker':

      $('#' + field.id)
      .val($('#' + field.id).val() ? $('#' + field.id).val() : field.value)
      .attr('autocomplete', 'off')
      .datepicker(options);

      break;

      Is where you need to look. I am not sure of the best way to solve this, as my javascript/jquery-fu is weak. My suggestion is the following modification, but it may have side effects/not be correct in this context:

      switch (field.type)
      {
      case 'datepicker':

      $('#' + field.id)
      .val($('#' + field.id).val() ? $('#' + field.id).val() : '')
      .attr('autocomplete', 'off')
      .datepicker(options);

      break;

    • #536
      Steve
      Keymaster

      @abdulhadi hallak– We were able to reproduce and we’re looking into a solution.

    • #537
      James Mc
      Member

      @Steve – when I inspected what was being stored in the post_meta table, which correctly was an empty value, it looked to me like it was the javascript that was being the culprit.

    • #557
      Steve
      Keymaster

      @abdulhadi hallak– Fixed in 0.7.1

Viewing 6 reply threads
  • You must be logged in to reply to this topic.