adapt pattern to use pikaday