5 ms·
Rome is a dependency-free, customizable date picker
- McGuffin 12y agoHow would one set week start day to monday in this? Can't really see an option for that among the options.
- wdewind 12y agoI'm a bit confused, how are we supposed to use this without node? Definitely interested in the standalone version.
- quarterto 12y agoNote that if you're using the standalone version, the API is published under the rome global. If you're using CJS, then you'll have to require('rome'). You can use Browserify[1] or WebPack[2] as a CommonJS module loader. [1]: http://browserify.org/ http://browserify.org/ [2]: http://webpack.github.io/ http://webpack.github.io/
- wdewind 12y agoRight, so when he says dependency free...
- quarterto 12y agoBy that reasoning nothing is dependency-free, as it requires a browser, or a computer, or a universe... Dependency-free almost always refers to runtime dependencies. A build tool is not a dependency. (Rome isn't dependency-free in that sense either[1], but hey...) [1]: https://github.com/bevacqua/rome/blob/master/package.json#L20 https://github.com/bevacqua/rome/blob/master/package.json#L2...
- wdewind 12y agoWhy isn't a build tool a dependency? Seems arbitrary to me.
- quarterto 12y agoBecause it isn't needed at runtime. Definitely not arbitrary. scons isn't a dependency of Google Chrome.
- wdewind 12y agoYeah I guess that makes sense. Fair enough.
- coldtea 12y agoBecause when we talk about dependencies we usually talk about runtime dependencies. If you'll need to load other stuff to run this as an end user. Do you count gcc and make as "dependencies" on installing and/or running some software built with them?
- rhizome 12y agoI would suggest something analogous to "static build" rather than anything having to do with dependencies.
- micampe 12y agoBy that reasoning everything is dependency free, because I can just static link all the required libraries, or provide them in a vendor directory in the download.
- bevacqua 12y agoJust take the assets in the `dist` directory and the API is accessible on the `rome` global.
- deleted 12y ago[deleted]
- wdewind 12y agoI think maybe don't advertise it as dependency free. The modifications to get it to native js aren't massive, but it's not dependency free. For one thing if I make those modifications I then lose all future updates (or they become a massive pain in the ass). Edit: I'm wrong, I misunderstood dependency free. It would be great to have a native js version of this anyway.
- bshimmin 12y agoI don't understand how this can be considered dependency free in any sense - it has a dependency on Moment.js, which is a fairly large (and very popular and good) library for working with dates in JavaScript. Without Moment.js, this library would not work - therefore it is "dependent" on that. This is what the word "dependency" means. Just because you can bundle up that library in the dist doesn't mean it's not a dependency.
- quarterto 12y agoDependency free, apart from all those dependencies it has? https://github.com/bevacqua/rome/blob/master/package.json#L20 https://github.com/bevacqua/rome/blob/master/package.json#L2... Edit: seems the dependencies are bundled in the distributed files, making it 55kb minified!
- personjerry 12y agoIt even says it depends on moment even in the readme. False advertising!
- eterm 12y agoThis looks like it lacks i8n. Many other (jquery ui based) datepickers have i8n modules with built in foreign day / month names.
- bevacqua 12y agomoment.js exposes i18n options[1], I'd just have to expose an API to allow you to add/set a language through their API. [1]: http://momentjs.com/docs/#/i18n/ http://momentjs.com/docs/#/i18n/
- jtheory 12y agoThis looks great. The two deal-breakers for me at the moment are the missing i18n, and support for older browsers (which I realize is increasingly rare these days, but unfortunately our webapp needs to support IE6+ for the time being. Yes, for real reasons).
- bevacqua 12y agoNow you can access moment through rome.moment, there you can do whatever you want, i18n-wise
- arcosdev 12y agoHow does this handle the existence of native datepickers (a la Chrome)?
- bevacqua 12y agoIgnores those, they're far too differently implemented across browsers. This just assumes you're using a `<input type='text' />`
- Akkuma 12y agoBad news. I've had a javascript library named Rome that I created over a year ago, https://github.com/Akkuma/Rome/commit/0cdcd210351d5c546064be857ec23d9f83d6dbe9 https://github.com/Akkuma/Rome/commit/0cdcd210351d5c546064be...
- makmanalp 12y agoLooks like you forgot to land-grab the npm package name :)
- Akkuma 12y agoI wasn't really intending to turn it into an npm package as I wrote it for browsers due to its use of MutationObserver.
- lobster_johnson 12y agonpm is very much used for browser libraries these days: http://browserify.org/ http://browserify.org/.
- Akkuma 12y agoI've never used browserify, despite working in node, so I could be off base but I thought you didn't need to make it an npm package to support CommonJS and play nicely with the rest of your browserify js.
- lobster_johnson 12y agoYou don't need a package.json to use CommonJS or even to use Browserify, but as a developer I don't want to copy external dependencies into a vendor folder to use them, I want to declare my deps in my app's package.json -- so any lib that uses CommonJS but doesn't provide a package.json I will probably not bother to use. People who use npm packages in browser code are pretty much all using Browserify or Webpack and leverage npm. (Many people use Bower, but I don't see the point of using two overlapping package managers.) It's a new dawn of modular JS code; no more global namespace, no more stuffing CDN links in your <head>. I recommend giving it a go.
- SN0flux 12y agoI'm looking at the example, specifically choosing only a date; You need to click off of the box entirely before the date gets updated, and it doesn't close when you click a date itself.
- bevacqua 12y agoFixed and thank you. In the future please report these kind of issues in the repository itself.
- bendyorke 12y agoThis looks awesome, great work.
- newman8r 12y agoa time-saving feature of many date pickers is the ability to exclude certain dates (weekends, holidays, sold out, etc.). Pretty easy to implement - just a suggestion.
- ejr 12y agoLooks nice. One tinsey issue; It doesn't seem to allow me to clear the field. If I accidentally clicked on the text field, I have no way to empty the field again. I cleared the contents of the field and clicked elsewhere, it fills the field with the last selected value.
- bevacqua 12y ago`invalidate: false` or `required: false`
- WorldWideWayne 12y agoDoes it let you pick dates with the keyboard?
- bevacqua 12y agoNot at the moment
- staz 12y agoI have been looking for a good datepicker to use at work, this one seems to miss a few things: No i18n (for days and months), doesn't close if you reclick the input, and no "today" button.