pwt.datepicker icon indicating copy to clipboard operation
pwt.datepicker copied to clipboard

initialValue Problem

Open farrokh-charoghchi opened this issue 5 years ago • 2 comments

Hello and thank you for your great Persian date projects, it helped me and my friends a lot.

When I'm using double binders like KnokoutJS and setting an input value by an observable, The input get and show the value on browser but it doesn't set value attribute. Therefore this code block:

if ($inputElem[0].nodeName === 'INPUT') { inputValue = $inputElem[0].getAttribute('value'); } else { inputValue = $inputElem.data('date'); }

in second line will get null as it's value.

In my case the second line should be like:

inputValue = $inputElem[0].value;

Finally I think it would be better like this:

inputValue = $inputElem[0].getAttribute('value') || $inputElem[0].value;

It works well for me.

Thanks a lot.

farrokh-charoghchi avatar Jan 14 '20 00:01 farrokh-charoghchi

@farrokh-charoghchi it will be fixed in next version

babakhani avatar Jun 22 '20 19:06 babakhani

hi thank you for the best plugin calendar I want to add Lunar in the plugin but has fa and en could you tell me how can I add a Lunar calendar for my project?

javadm3 avatar Nov 17 '21 16:11 javadm3