Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Don't select an option start with "0" #54

Open
rakker1985 opened this issue Jul 14, 2014 · 5 comments
Open

Don't select an option start with "0" #54

rakker1985 opened this issue Jul 14, 2014 · 5 comments

Comments

@rakker1985
Copy link

Hello,

I'm currently trying to implement the fancy select jQuery plugin.
I run into a problem.
It seems the script don't accept a number start with a "0".
I want to add the script as a way to select a time range from 0 to 60 minutes.

How can I solve this?

Thanks in advance.

Kind regards,

Stefan van Daalen

@emwee
Copy link

emwee commented Jul 25, 2014

By number, do you mean 'value'? Have you tried the 'includeBlank' option? (undocumented, so check the source code).

@rakker1985
Copy link
Author

No I mean a number like: 01, 02. It accepts 1 or 2. The 0 before it is the problem.

@emwee
Copy link

emwee commented Jul 25, 2014

but what exactly do you mean by number? could you provide some example code?

@dahliacreative
Copy link

I'm having this issue too. So if you have a select for say month.
If your values for your months are: 01, 02, 03 etc. Then fancyselect doesn't work.
If you remove the leading 0 from your values, eg. 1, 2, 3 etc then it does.

@paulstraw
Copy link
Owner

Presumably this is happening because of these lines: https://github.com/octopuscreative/FancySelect/blob/master/fancySelect.coffee#L184-L186

Would someone mind checking if opt.val().toString() fixes the issue? I'd gladly accept a PR if that does the trick.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants