Finally have this working the way I'd like, i.e. using mm-dd-yyyy date formatting.
In the process of getting things working, I discovered a problem with the calendar class (admin\dom\html\form\input\calendar.php) so I made a change there (and in my item's model)
The calendar class generated a run-time error because it was using the formatted date to create a date object so some of the other date formats cause errors and it just seemed that a simple fix would be to change the calendar class to use the raw date value (in SQL format) instead.
The following three lines of code were changed in the calendar class:
Line 143 (pass the date without formatting)
$html = self::calendar(
$formatedDate,
$this->getInputName(),
$this->getInputId(),
...
to
$html = self::calendar(
-> $this->dataValue, $formatedDate,
$this->getInputName(),
$this->getInputId(),
...
Line 173 (function declaration)
public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attribs = null, $config = array())
to
public static function calendar($value, $formated_date, $name, $id, $format = '%Y-%m-%d', $attribs = null, $config = array())
Line 244 (show the formatted date)
return '<input type="text" title="' . (0 !== (int) $value ? JHtml::_('date', $value) : '') . '" name="' . $name . '" id="' . $id
. '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" ' . $attribs . ' />'
. ($readonly ? ''
: JHtml::_('image', $imgBaseUrl . '/calendar.png', $imgAlt, array('class' => 'calendar', 'id' => $id . '_img'), true));
to
return '<input type="text" title="' . (0 !== (int) $value ? JHtml::_('date', $value) : '') . '" name="' . $name . '" id="' . $id
-> . '" value="' . htmlspecialchars($formated_date, ENT_COMPAT, 'UTF-8') . '" ' . $attribs . ' />'
. ($readonly ? ''
: JHtml::_('image', $imgBaseUrl . '/calendar.png', $imgAlt, array('class' => 'calendar', 'id' => $id . '_img'), true));
For now, in order to get the values to save, I added code in the item model's "prepareTable" method to convert the date back to SQL format but at some point, I'll look for a more global fix since I'd rather not have to do this every time I add a date field.
Hopefully this is useful to others (and maybe the calendar class would be updated if this makes sense for all users?)
Dave