The date converter and the date picker donot appear to use the same string format. I guess this never got logged: https://forum.xwiki.org/t/type-date-not-working-with-wikimacro-parameters/12252
I'm having some additional goofiness where it isn't respecting my parameter name. Despite my parameter being named "yo" the parameter shows up in $wikimacro.parameters.getParameterNames() as "Date". It's type is String, which is why formatting it wasn't working I guess. Ironically if I name the parameter "date" it doesn't show up at all. Here is my parameter:
 Here is my macro code:
{{velocity}}
$datetool.getClass() datetool #[[=]]# $datetool
$wikimacro.parameters.getParameterNames()
$wikimacro.parameters.date.getClass() wikimacro.parameters.date #[[=]]# $wikimacro.parameters.date
#if($wikimacro.parameters.date)
$datetool.format($wikimacro.parameters.date)
#else
{{error}}Select Date{{/error}}
#end
{{/velocity}}
Here is my result after I select today's date:
|