Implemented the editDatum Listener and fixed two bugs