modified edit template to allow date control.