fixed date html('') in edit material and fixed selecting the saved material