bevacqua/rome

Custom Time Options

trymeouteh opened this issue · 0 comments

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']])
    });