You can see how B4XDateTemplate is implemented and implement something similar that will meet your requirements.
It is a very app specific element.
i have discovered Template mode for custom dialogs, i have discovered the Build Tools, but i don't understand:
1) Where is the code for work fine the template, for example for DateTemplate where is the code for manage the buttons (increment month, day, ecc,ecc)
2) Where i can find the json file for a exist template. for example for DateTemplate i have found the jbil, but not .json file
Thanks