nazar-pc / PickMeUp

Really simple, powerful, customizable and lightweight standalone datepicker
BSD Zero Clause License
615 stars 191 forks source link

Better demos: the complete kitchen sink #86

Open EHLOVader opened 9 years ago

EHLOVader commented 9 years ago

Right now the demos are missing a few key examples, which would be helpful for testing that code doesn't break all possible uses in the future.

So I propose a better kitchen sink.

Obviously I missed many permutations but I was trying to think if all possible fringe cases where things could go wrong.

nazar-pc commented 9 years ago

I'm not sure that demo should be responsible for checking whether something is broken. Automated tests should do this, but there are no tests here yet.

EHLOVader commented 9 years ago

Absolutely.

I agree that tests should be responsible for most of this, but when in the absence of tests I feel that a reasonable set of examples which should always work would make sense for the ease of manual testing before submitting a PR.

We have a set of examples, which fits a small portion of the use cases possible from the configuration, I just think that until there is testing it would be simple to expand the examples for this purpose.

nazar-pc commented 9 years ago

Agree, this can be done. BTW, it would be nice to show examples alongside with code that generates them, like here: http://getuikit.com/docs/tab.html

EHLOVader commented 9 years ago

:+1: definitely.

As I understand it the main idea of PMU is that it is framework agnostic, would you suggest adding one for layout and code formatting within the demo? UIKit or Bootstrap.

nazar-pc commented 9 years ago

For simplicity it can be done without any framework, there is really not that much markup (or include some from CDN, just do not include it into repository, from those two I personally prefer UIkit), for syntax highlighting Prism is a very good one (though, it seems, they do not have any CDN).

EHLOVader commented 9 years ago

Yeah, no need to include the framework in the repo for the demo, but having it may make it look nice.

I am sure there is a reliable third party JS cdn that has prism. Quick search turned up this... http://cdnjs.com/libraries/prism

And there is also always http://rawgit.com/

nazar-pc commented 9 years ago

I have nothing against using whatever framework in demo.

ambicoder commented 4 years ago

more demos...are required for sure...for example...how am I going to get the date selected as a string. I tried to use eventListener...I get error though in the console.

nazar-pc commented 4 years ago

@ambicoder if you have difficulties, create a separate issue and add more details. Contributions with more/better demos are definitely welcome!