This question already has an answer here:
Is there possibility to use field widgets to create these kinds of fields? I can't find any information how to use it while form creating.
I found something like this http://devblog.com.au/using-the-date-widget-with-drupals-form-api but I'm looking for another widgets info (how to use it).
In addition, I don't use the entity type in this case (custom structure).