changed deprecated widget to button and fixed error occurring when [] in name

1. The loop can go infinitely if 'date.min' > 'date.max'.
2. The loop can go for a long time if there's a very short period (days) between 'date.min' and 'date.max'.

I know the first case is about invalid HTML limits but this shouldn't hang a browser as actually happens.
I believe 'date.min' < 'date.max' condition should be checked manually and if it's fine, random numbers (getDummyNumber(limits)) for year, month and day should be returned and put together as a date. It's a bit more code to write, but it's also a safer approach.