chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 87 forks source link

New mode dp-permanent to allow static calendars #42

Closed taomatico closed 7 years ago

taomatico commented 7 years ago

There are a lot of projects that need an static calendar to satisfy its requirements. Tiny Date Calendar is a nice module with a nice base and API support, it could be awesome to take advantage of it in this kind of applications.

One example of functionality could be the one used in this project:

https://www.campus.co/madrid/en/events

As you can see the calendar remains all time in the page, and every action of the site revolves around it. Using the current version of Tiny Date Calendar for this purpose is imposible as its needed an input html field. Furthermore, any click outside the module forces a close action.

With this pull request I have tried to enhance the calendar with the next improvements:

With these changes Tiny Date Calendar will now be able to give support to projects which needs static calendars to be used via API.

I saw a similar pull request closed by inactivity that solved the lack giving a 'stayVisible' option. I tried to make this one at first but finally I thought that the current propossed focus is more consistent.

I've tried to make the less changes as be possible and respect your code style. I hope you like the contribution.

Thank you and best regards.

chrisdavies commented 7 years ago

Hey, I love it when people file pull-requests instead of issues. :)

I'll check it out tomorrow (or maybe the 5th, since tomorrow's a holiday in my country), and if everything's good to go, I'll publish it.

Thanks!

taomatico commented 7 years ago

Thank you so much Chris! I have seen you have completed the documentation. I'll do it next time.

Best regards!