creaturesinunitards / mithril-datepicker Goto Github PK
View Code? Open in Web Editor NEWPick a date! But only if you're using Mithril. (component for Mithril.js ^v1.0)
License: MIT License
Pick a date! But only if you're using Mithril. (component for Mithril.js ^v1.0)
License: MIT License
Cannot require and use datePicker directly in webpack because Mithril global object is not available. And throws an error while building m
is not defined.
If you update the date during a redraw the date doesn't get updated but stays the original one. The view should check for a updated vnode.attrs.date and then update the vnode.state.date property.
I found a very unusual (and unnecessary) eval
call. This makes it unusable in CSP contexts as well as minified code, since those variables can't be minified. It's also trivially substituted for its own variables, and literally takes the same number of lines.
Since you opened an issue about accessibility, I'll log the next one about localization. I want LUNES!!!
After I pick a date, I would like two things:
Your Sass variables aren't namespaced, which makes integration a little harder into existing projects. I personally added a mdp-
prefix to the variables for my use case, but you shouldn't feel constrained by that.
there would be nice to restrict the user input by
m(DatePicker, {
data: ...,
allowPastDates: true, // defaults to now
interval: {
start: "08/07/17", // defaults to now
end: "12/12/17"
}
onchange: ...
})
I would expect each invocation of the datepicker to default to its standard view (#2 in attached img); rather it seems to retain last-viewed state.
Some times people want to directly input a date from keyboard, can add this?
would be great to be able to use this without webpack/browserify plugins
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.