Tagged: datepicker
- This topic has 6 replies, 3 voices, and was last updated 9 years, 1 month ago by
Steve.
-
AuthorPosts
-
-
December 9, 2012 at 12:58 pm #526
abdulhadi hallakMemberthe date-picker field returns “false” as a value after saving if i leave the field blank
-
December 10, 2012 at 4:41 pm #532
abdulhadi hallakMemberhi, anyone have a solution for this issue ?
-
December 10, 2012 at 7:33 pm #533
James McMemberHi,
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.
-
December 10, 2012 at 8:22 pm #535
James McMemberThe 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;
-
December 10, 2012 at 9:34 pm #536
SteveKeymaster@abdulhadi hallak– We were able to reproduce and we’re looking into a solution.
-
December 10, 2012 at 10:20 pm #537
James McMember@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.
-
December 13, 2012 at 12:56 pm #557
SteveKeymaster@abdulhadi hallak– Fixed in 0.7.1
-
-
AuthorPosts
- You must be logged in to reply to this topic.