bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Calendar/Date input

Open wburningham opened this issue 15 years ago • 96 comments

I think it would be great to have some CSS for a calendar widget. It may seem pointless to have CSS without some JS to accompany it. Would it be possible to have a calendar icon appended to an input that when clicked on would display the calendar. I know jQuery UI can accomplish this, but it would great if it matched the Boostrap CSS.

wburningham avatar Oct 19 '11 15:10 wburningham

yep we've talked about adding this :)

fat avatar Oct 19 '11 16:10 fat

I don't know how far along you are, but I would suggest something similar to the attached image.

On Wed, Oct 19, 2011 at 10:42 AM, Jacob Thornton [email protected] wrote:

yep we've talked about adding this :)

Reply to this email directly or view it on GitHub: https://github.com/twitter/bootstrap/issues/445#issuecomment-2458164

wburningham avatar Oct 19 '11 17:10 wburningham

you can't attach images

fat avatar Oct 19 '11 17:10 fat

Here is a link: http://goo.gl/yh1yA

wburningham avatar Oct 19 '11 17:10 wburningham

There is also a jQuery plugin here: https://github.com/jonleighton/date_input

wburningham avatar Oct 19 '11 19:10 wburningham

What are the thoughts of just rolling a Bootstrap jQuery UI theme? I'd hate to duplicate work too much...

brennanmceachran avatar Oct 19 '11 19:10 brennanmceachran

How many other features of Bootstrap are going to use jQuery UI. If there are enough it may be smart to create a theme.

W J Burningham Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Wednesday, October 19, 2011 at 1:28 PM, brennanmceachran wrote:

What are the thoughts of just rolling a Bootstrap jQuery UI theme? I'd hate to duplicate work too much...

Reply to this email directly or view it on GitHub: https://github.com/twitter/bootstrap/issues/445#issuecomment-2460088

wburningham avatar Oct 19 '11 20:10 wburningham

We don't have plans ourselves to write a jquery ui theme, although i've heard others have taken a swing at it, which is awesome!

We don't plan on duplicating work either - our development philosophy is very different from the jquery ui teams approach. A good example of this is our tab implementations. Jquery's tab widget is about 2500 lines of code, where our's is about 50 lines.

There's lots of room of innovation in this space and the way we are currently approaching development allows us to cut a lot of corners that just isn't possible for the jquery-ui team.

fat avatar Oct 19 '11 21:10 fat

2500?! Seriously? That's what I like about Bootstrap! It "feels" very light.

I'd actually love some form widgets in bootstrap (calendar, slider, validations)... As long as it doesn't make bootstrap feel like jQuery UI, if you know what i mean?

brennanmceachran avatar Oct 19 '11 21:10 brennanmceachran

Yep - we definitely plan on building lots more stuff like that :)

fat avatar Oct 19 '11 23:10 fat

(you can't attach, but you can link to it cal )

plentz avatar Oct 24 '11 02:10 plentz

I tossed up a crude design based on jquery.date_input.js, attempting to match bootstrap's visual style. See it in action here: http://dl.dropbox.com/u/143355/datepicker/datepicker.html

I plan to write a new datepicker plugin to clean up the markup and match the bootstrap structure of configuring UI elements with data attributes.

Datepicker Screenshot

storborg avatar Oct 31 '11 19:10 storborg

nice one @storborg, i would be nice to have an option to make the months and year as dropdown & input for year. Love it man! great job.

kevsmt avatar Oct 31 '11 19:10 kevsmt

Beautiful work @storborg, thanks :)

dirkkelly avatar Nov 03 '11 01:11 dirkkelly

nice one

kasperp avatar Nov 03 '11 07:11 kasperp

This is really cool @storborg!

hanshasselberg avatar Nov 03 '11 10:11 hanshasselberg

@storborg: It's really nice. However, there are some problems in Opera/Linux:

  • No rounded borders on days
  • Weird white space on the right side of the month/year picker
  • Incorrectly aligned arrows

Preview

smasty avatar Nov 03 '11 13:11 smasty

This would be a lifesaver- Really excited about storberg's work here

thatfunkymunki avatar Nov 14 '11 00:11 thatfunkymunki

Great work @storborg!

arielkirkwood avatar Nov 14 '11 02:11 arielkirkwood

Broheim, looking badass. Few questions and comments for you to consider:

  • Submit a pull request! Make it for 2.0-wip and we'll add this in as soon as we can.
  • Why are you using divs instead of a table? I understand the advantages I think, but what I like about tables here is that they maintain their intended structure when styles are missing or broken.
  • Good work on accounting for overlap dates—nicely done.
  • Do you see this being extensible to include two months at the same time, side-by-side?

Keep up the good work!

mdo avatar Nov 17 '11 08:11 mdo