Implemented lock mechanisim for date type.