Compressing the code in calendar field and reusing max-length attribute.