store dates as numbers so they can be serialized
use viewId if passed in config