Serhioromano / bootstrap-calendar

Full view calendar with year, month, week and day views based on templates with Twitter Bootstrap.
http://bootstrap-calendar.eivissapp.com/
MIT License
3.02k stars 1.29k forks source link

version without requests to the server. #743

Open Triden opened 6 years ago

Triden commented 6 years ago

Nonsense is what. I do not understand why "tmpl_path:" is needed. Do as many unnecessary queries on the server. It's not worth it! Why can not it be generated on the browser side? Why can not I automatically generate a calendar and pass there an object with data?

LucileDT commented 6 years ago

Maybe you could create your own project or fork this one if you think you could do better?

eleazan commented 6 years ago

So, if you are worried about that.. do it.

It's easy, you only need to inject the tmpl to code ( options.templates[name_of_template] ). That's the function that load it:

https://github.com/Serhioromano/bootstrap-calendar/blob/4d8776fec85a55ee2e4e679a2a13a114782422f8/js/calendar.js#L1015

Try!