Fixed a bug with single quotes and JS properties

...which would crash the JavaScript side of the library if the
properties passed to the Date element would contain single quotes (like
month/day names, the caption for the "Clear" and "Today" buttons, etc);
thanks to nlerow!