Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieldogeanu/cca1cc82c0761e71689845a2c363b0d9 to your computer and use it in GitHub Desktop.
Save danieldogeanu/cca1cc82c0761e71689845a2c363b0d9 to your computer and use it in GitHub Desktop.
Disable Spinner and Native Calendar Dropdown
// Disable Spinner and Native Calendar Dropdown
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"] {
appearance: textfield;
&::-webkit-calendar-picker-indicator {
display: none;
}
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
&::-webkit-clear-button {
display: none;
-webkit-appearance: none;
}
&::-webkit-datetime-edit-fields-wrapper {
visibility: hidden;
}
}
// You could do it this way (may not work in some browsers), or you could use JavaScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment