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

How to open datepicker with tab on focus? #80

Closed
nunowar opened this issue Feb 11, 2017 · 7 comments
Closed

How to open datepicker with tab on focus? #80

nunowar opened this issue Feb 11, 2017 · 7 comments

Comments

@nunowar
Copy link

nunowar commented Feb 11, 2017

Hi

What the best way to open Zebra_Datepicker when input is on focus and when input is clicked?

Thanks

@rickydeez
Copy link

+1

@stefangabos
Copy link
Owner

ok, will implement this tomorrow

stefangabos added a commit that referenced this issue Jul 11, 2017
…associated icon is focused by setting the "open_on_focus" property to TRUE (#80)
@stefangabos
Copy link
Owner

Please let me know if this is ok for you guys so I can close it. Thanks!

@nunowar
Copy link
Author

nunowar commented Jul 11, 2017

With release 1.9.6 my app works well, with last version with open_on_focus I get some errors like:

Uncaught ReferenceError: rules is not defined
    at check_date (datepicker.js:1744)
    at init (datepicker.js:937)
    at new $.Zebra_DatePicker (datepicker.js:3232)
    at HTMLInputElement.<anonymous> (datepicker.js:3248)
    at Function.each (jquery.js:2)
    at r.fn.init.each (jquery.js:2)
    at r.fn.init.$.fn.Zebra_DatePicker (datepicker.js:3239)
    at HTMLDivElement.<anonymous> (edit-portfolio.js:203)
    at Function.each (jquery.js:2)
    at edit-portfolio.js:201

edit-portfolio.js:201

$.each($('.js-experience'), function(i, val){
	var el_experience_date_end = $(val).find('.js-experience-date-end');
	$(val).find('.js-experience-date-start').Zebra_DatePicker({format:'m Y', direction:false, pair:el_experience_date_end, onSelect:function(a, b, c, d) {
		save_experience(d.parent().parent());
	}});

	el_experience_date_end.Zebra_DatePicker({format:'m Y', direction:true, onSelect:function(a, b, c, d) {
		save_experience(d.parent().parent());
	}});

	var el = $(val).find('.js-experience-checkbox');

	if(el.prop('checked') == true){
		el.parent().parent().next().hide();
	}
});

@stefangabos
Copy link
Owner

Should be ok now - thanks for the heads-up

@nunowar
Copy link
Author

nunowar commented Jul 11, 2017

Yeah works! Thanks!

How I can pay you a beer?

@nunowar nunowar closed this as completed Jul 11, 2017
@stefangabos
Copy link
Owner

Starring the repo will do. If you already done that then we're cool :)

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

3 participants