When using the "Text Field with javascript pop-up calendar" and editing a date with a time in the afternoon or evening (pm) the pm changes to am.

So for every time I edit a pm date I have to make sure to click the am to make it pm again

Comments

Lowell’s picture

I noticed that if the time is set for exactly 12:00pm then the pm stays as pm when editing the date/time

karens’s picture

Project: Date » Javascript Tools
Component: Code » Jscalendar

This appears to be a jscalendar bug. I get the same behavior if I enter a date with a pm value the jscalendar widget displays it as am instead.

Here is the source of an item that produces the wrong behavior for me:

<fieldset><legend>Test date </legend><div class="form-item">
 <label for="edit-field-test-date-0-value">From date: </label>
 <input type="text" maxlength="128" name="field_test_date[0][value]" id="edit-field-test-date-0-value"  size="60" value="03/13/2007 - 3:00pm" class="form-text jscalendar" />
</div>
<input type="hidden" name="field_test_date[0][value_jscalendar][ifFormat]" id="edit-field-test-date-0-value-jscalendar-ifFormat" value="%m/%d/%Y - %l:%M%P"  />
<input type="hidden" name="field_test_date[0][value_jscalendar][showsTime]" id="edit-field-test-date-0-value-jscalendar-showsTime" value="true"  />
<input type="hidden" name="field_test_date[0][value_jscalendar][timeFormat]" id="edit-field-test-date-0-value-jscalendar-timeFormat" value="12"  />
<input type="hidden" name="field_test_date[0][value2_jscalendar][ifFormat]" id="edit-field-test-date-0-value2-jscalendar-ifFormat" value="%m/%d/%Y - %l:%M%P"  />

<input type="hidden" name="field_test_date[0][value2_jscalendar][showsTime]" id="edit-field-test-date-0-value2-jscalendar-showsTime" value="true"  />
<input type="hidden" name="field_test_date[0][value2_jscalendar][timeFormat]" id="edit-field-test-date-0-value2-jscalendar-timeFormat" value="12"  />
<div class="form-item">
 <label for="edit-field-test-date-0-value2">To date: </label>
 <input type="text" maxlength="128" name="field_test_date[0][value2]" id="edit-field-test-date-0-value2"  size="60" value="03/13/2007 - 5:00pm" class="form-text jscalendar" />
</div>
</fieldset>