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

Custom Time Options #224

Open
trymeouteh opened this issue Mar 11, 2024 · 0 comments
Open

Custom Time Options #224

trymeouteh opened this issue Mar 11, 2024 · 0 comments

Comments

@trymeouteh
Copy link

Please add the ability to choose custom time options as you can for dates.

Using this feature I would image would look something like this, similar to customising the date options

    //10:37 not selectable
    rome(document.querySelectorAll('input')[0], {
        timeValidator: rome.val.except('10:37')
    });

    //10:37, 12:32 and 14:04 not selectable
    rome(document.querySelectorAll('input')[1], {
        timeValidator: rome.val.except(['10:37', '12:32', '14:04'])
    });

    //10:37 - 12:32 not selectable
    rome(document.querySelectorAll('input')[2], {
        timeValidator: rome.val.except('10:37', '12:32')
    });

    //09:56 and 10:37 - 12:32 not selectable
    rome(document.querySelectorAll('input')[3], {
        timeValidator: rome.val.except(['09:56', ['10:37', '12:32']])
    });



    //10:37 only selectable
    rome(document.querySelectorAll('input')[4], {
        timeValidator: rome.val.only('10:37')
    });

    //10:37, 12:32 and 14:04 only selectable
    rome(document.querySelectorAll('input')[5], {
        timeValidator: rome.val.only(['10:37', '12:32', '14:04'])
    });

    //10:37 - 12:32 only selectable
    rome(document.querySelectorAll('input')[6], {
        timeValidator: rome.val.only('10:37', '12:32')
    });

    //09:56 and 10:37 - 12:32 only selectable
    rome(document.querySelectorAll('input')[7], {
        timeValidator: rome.val.only(['09:56', ['10:37', '12:32']])
    });
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

1 participant