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

change event dose not work #16

Closed
dmyy2007 opened this issue Apr 27, 2015 · 1 comment
Closed

change event dose not work #16

dmyy2007 opened this issue Apr 27, 2015 · 1 comment

Comments

@dmyy2007
Copy link

datepicker is configed as follow
'clientEvents' => [
'change' => 'function () { alert('event "change" occured.'); }'
],
it doesnt work.

i find the 96 line code in the file yii2-jui\widget.php

            if (isset($this->clientEventMap[$event])) {
                $eventName = $this->clientEventMap[$event];
            } else {
                $eventName = strtolower($name . $event);
            }

will produce the js like the following:

          jQuery('#w1').on('datepickerchange', function () {....}

the event datepickerchange dose not exist.

change 96 line code to
$eventName = strtolower($event);
will work.

is this a bug or any other use ?

@cebe
Copy link
Member

cebe commented Apr 27, 2015

according to the jqueryUI docs the datepicker does not provide any events: http://api.jqueryui.com/datepicker/

@cebe cebe closed this as completed Apr 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants