DragonByte Tech
Well-known member
I'm trying to create an input row with both a date picker and hour/minute inputs, I expected this to be an option for
Additionally, the
Am I missing something, or is this the first case of doing something in XF2 being more difficult than it should be?
EDIT: If I'm correct in that time inputs aren't baked in but hidden somewhere, a suggested patch would be to add this directly below the
While untested, this should in theory allow for the input variable to be an array that allows for hours/minutes/seconds inputs as well. I really hope time input support is something that will be implemented before Gold, since it's very important in some cases.
Fillip
<xf:dateinputrow>
but that does not appear to be the case.Additionally, the
datetime
input filterer does not appear to support time input when it's not baked into the date format from the date picker, since the value gets passed directly to the DateTime
class.Am I missing something, or is this the first case of doing something in XF2 being more difficult than it should be?
EDIT: If I'm correct in that time inputs aren't baked in but hidden somewhere, a suggested patch would be to add this directly below the
case 'datetime':
statement:
PHP:
if (is_array($value) && isset($value['date']))
{
if (!isset($value['hours']))
{
$value['hours'] = !empty($options['end']) ? 23 : 0;
}
if (!isset($value['minutes']))
{
$value['minutes'] = !empty($options['end']) ? 59 : 0;
}
if (!isset($value['seconds']))
{
$value['seconds'] = !empty($options['end']) ? 59 : 0;
}
$value = "{$value['date']} {$value['hours']}:{$value['minutes']}:{$value['seconds']}";
}
While untested, this should in theory allow for the input variable to be an array that allows for hours/minutes/seconds inputs as well. I really hope time input support is something that will be implemented before Gold, since it's very important in some cases.
Fillip
Last edited: