Are there any style options for the HTML5 Date picker?

The following eight pseudo-elements are made available by WebKit for customizing a date input’s textbox: ::-webkit-datetime-edit ::-webkit-datetime-edit-fields-wrapper ::-webkit-datetime-edit-text ::-webkit-datetime-edit-month-field ::-webkit-datetime-edit-day-field ::-webkit-datetime-edit-year-field ::-webkit-inner-spin-button ::-webkit-calendar-picker-indicator So if you thought the date input could use more spacing and a ridiculous color scheme you could add the following: ::-webkit-datetime-edit { padding: 1em; } ::-webkit-datetime-edit-fields-wrapper { background: silver; } ::-webkit-datetime-edit-text … Read more

Javascript date.getYear() returns 111 in 2011? [duplicate]

https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getYear getYear is no longer used and has been replaced by the getFullYear method. The getYear method returns the year minus 1900; thus: For years greater than or equal to 2000, the value returned by getYear is 100 or greater. For example, if the year is 2026, getYear returns 126. For years between and including … Read more

jQuery UI Datepicker onchange event issue

You can use the datepicker’s onSelect event. $(“.date”).datepicker({ onSelect: function(dateText) { console.log(“Selected date: ” + dateText + “; input’s current value: ” + this.value); } }); Live example: $(“.date”) .datepicker({ onSelect: function(dateText) { console.log(“Selected date: ” + dateText + “; input’s current value: ” + this.value); } }) .on(“change”, function() { console.log(“Got change event from … Read more