X or clear button
Even though the class referring to the clear button can be found through Shadow DOM inspection (i.e. .datetime-reset-button from datetimebox.css):

And direct changes in the inspector/devtools work (e.g. add display: none
to the class), shadow root access and shadow elements manipulation/attachment is not allowed in <input>
tags, leading to a "DOMException: Operation is not supported" if myInput.attachShadow({mode: 'open'})
is attempted (e.g. :host-context MDN example).
An alternative/workaround is to place an overlay image/background on the input's container through ::after
:
@-moz-document url-prefix() { /* apply rules only to Firefox */
.my-datetime-input-container::after {
content: "";
position: absolute;
top: 42%;
right: 0.25rem;
background: url(/images/overlay.svg) white no-repeat;
/* or simply use background: white; */
background-size: 1rem;
width: 1rem;
height: 1rem;
}
}
This overlay prevents clicks/taps on the Shadow DOM clear button because it's literally covering it (needs an opaque background to completely hide it).
Font family issues
Changing the input's font, may be a specificity issue, attempting a more specific selector may be enough to apply the rule:
.my-datetime-input-container input[type="date"].my-specific-class {
font-family: inherit;
}
Where:
<div class="my-datetime-input-container">
<input type="date" class="my-specific-class" />
</div>