Angular directive for input type=date that correctly parses and renders type date