Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using foundation-datepicker for a standalone calendar #14

Closed
marks opened this issue Jul 2, 2013 · 3 comments
Closed

Using foundation-datepicker for a standalone calendar #14

marks opened this issue Jul 2, 2013 · 3 comments
Labels

Comments

@marks
Copy link

marks commented Jul 2, 2013

Great job! Wondering if you have any pointers on how to use this repo for a standalone calendar that appears w/o input boxes.

Mark

@najlepsiwebdesigner
Copy link
Owner

Hmm..interesting idea, I would probably never think about this. This datepicker exposes show/hide methods, so you can probably use it only like this:

  1. create input field and setup datepicker normally
  2. call show method of datepicker (or just trigger click on that input field)
  3. hide the input filed

...I dont like it, but should do the trick

@narehart
Copy link

Actually, if you find line 48 in foundation-datepicker.js:

this.isInline = false;

and change it like so:

this.isInline = options.isInline;

then call the datepicker with the new option:

$('.datepicker').fdatepicker({isInline: true});

the picker will be appended to your selector. You can then either hide it using css or set the input type to hidden.

Cheers!

@najlepsiwebdesigner
Copy link
Owner

As satandalone calendar, I'm using https://github.com/Serhioromano/bootstrap-calendar (http://bootstrap-calendar.azurewebsites.net) with great success. It's not compatible with foundation right out of the box, but you can restyle it quite easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants