

Rome is a dependency-free, customizable date picker - bevacqua
https://github.com/bevacqua/rome?hn

======
quarterto
Dependency free, apart from all those dependencies it has?
[https://github.com/bevacqua/rome/blob/master/package.json#L2...](https://github.com/bevacqua/rome/blob/master/package.json#L20)

Edit: seems the dependencies are bundled in the distributed files, making it
55kb minified!

~~~
personjerry
It even says it depends on moment even in the readme. False advertising!

------
SN0flux
I'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
Fixed and thank you. In the future please report these kind of issues in the
repository itself.

------
wdewind
I'm a bit confused, how are we supposed to use this without node? Definitely
interested in the standalone version.

~~~
bevacqua
Just take the assets in the `dist` directory and the API is accessible on the
`rome` global.

~~~
wdewind
I 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
I 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.

------
eterm
This looks like it lacks i8n. Many other (jquery ui based) datepickers have
i8n modules with built in foreign day / month names.

~~~
bevacqua
moment.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
This 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
Now you can access moment through rome.moment, there you can do whatever you
want, i18n-wise

~~~
jtheory
Cool, kudos to you for being so responsive! I see several threads with a
similar resolution here.

------
McGuffin
How would one set week start day to monday in this? Can't really see an option
for that among the options.

~~~
quarterto
Doesn't look configurable:
[https://github.com/bevacqua/rome/blob/master/src/rome.js#L35...](https://github.com/bevacqua/rome/blob/master/src/rome.js#L356-L359)

------
ejr
Looks 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
`invalidate: false` or `required: false`

------
bendyorke
This looks awesome, great work.

------
staz
I 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.

~~~
corford
I've been using [http://amsul.ca/pickadate.js/](http://amsul.ca/pickadate.js/)
lately and it's been excellent. Highly recommend it.

------
newman8r
a 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.

~~~
bevacqua
implemented in v0.4.0
[https://github.com/bevacqua/rome/blob/master/CHANGELOG.md](https://github.com/bevacqua/rome/blob/master/CHANGELOG.md)

------
Akkuma
Bad news. I've had a javascript library named Rome that I created over a year
ago,
[https://github.com/Akkuma/Rome/commit/0cdcd210351d5c546064be...](https://github.com/Akkuma/Rome/commit/0cdcd210351d5c546064be857ec23d9f83d6dbe9)

~~~
makmanalp
Looks like you forgot to land-grab the npm package name :)

~~~
Akkuma
I 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
npm is very much used for browser libraries these days:
[http://browserify.org/](http://browserify.org/).

~~~
Akkuma
I'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
You 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.

------
arcosdev
How does this handle the existence of native datepickers (a la Chrome)?

~~~
bevacqua
Ignores those, they're far too differently implemented across browsers. This
just assumes you're using a `<input type='text' />`

------
WorldWideWayne
Does it let you pick dates with the keyboard?

~~~
bevacqua
Not at the moment

