Fix date picker

Not yet ready to merge. Needs testing. Related to #14