add block based API to date picker