Datepicker in Groovy

How can i get a datepicker input in Groovy?

The old uicomponents don’t work anymore and I wasn’t able to get the new one working in Groovy.