5 ms·
I've been trying htmx and the results are great. So much simpler to code than with SPA. My only concern is about those datetime pickers and other type of "compo
by drchaim 4y ago
I've been trying htmx and the results are great. So much simpler to code than with SPA. My only concern is about those datetime pickers and other type of "components" that is easy to get from a react/vue ecosystem but much harder in a vanilla Javascript way. Not saying it's impossible, but a bit harder to find decent maintain libraries/components for those kind of web interactions.
- Scarbutt 4y agoI haven't use it but my understanding is that htmx is normally paired with something like alpinejs for which there existes date picker components.
- S34RZrXNZoeemHj 4y ago<input type="date"> Why would you need JS at all for a date picker?!
- sergiotapia 4y agoI am totally with you. Unfortunately firefox as usual cocks it up for the rest of us.
- phil-martin 4y agoBecause the built in date pickers (and other editors) don't always fit the requirements? A couple of things I had to handle in the last couple of weeks: - Handling different separators for input - having a clear button to indicate "no date" - display the date in a different format
- dham 4y agoYea, would have been nice if the W3C actually gave us usable components, but hey you can connect your MIDI keyboard to the browser.
- jaredcwhite 4y agoI would focus less on "vanilla JavaScript" as the ecosystem from which good components will arise and focus more on web components (which, generally speaking, are vanilla JavaScript). There is a thriving and growing sector of the frontend space where web components and WC-based design systems are coming to the forefront. Shoelace is a fantastic library in this vein. Libraries like htmx, Alpine, Turbo, etc. benefit greatly from web components.
- vindarel 4y agoSame here, I would love an example on how to use a customizable asynchronous typeahead with HTMX (think Twitter Typeahead, not <datalist>). Couldn't find one or wrap my head around it. (We can hook HTMX into the library events, maybe?).
- megaman821 4y agoI have been using web components for those things. They actually pair great with htmx. Once you import a my-datepicker or my-modal web component it automatically works anytime it appears in the DOM. So htmx can ajax in some HTML and you don't have to wire up an JavaScript to it to get rich interactions. Check out Shoelace (https://shoelace.style/ https://shoelace.style/) for a good set of components.