Angular Form在Chrome中验证但不在Firefox Bootstrap Datepicker中验证

时间:2016-07-07 22:03:31

标签: javascript angularjs twitter-bootstrap google-chrome

我有一个在Chrome中验证的表单,但是使用mm / dd / yyyy格式在firefox中验证了bootsrap日期选择器。如果输入yyyy / dd / mm,则验证。我的datepicker html如下。为什么它会在Chrome中验证并启用提交按钮,而不是使用相同格式的firefox?

private void selectOSXFolderFavorite(int favorite) {

    // With an OSX file folder dialog open, Shift-Tab to favorites list
    robot.keyPress(KeyEvent.VK_SHIFT);
    robot.keyPress(KeyEvent.VK_TAB);
    robot.keyRelease(KeyEvent.VK_TAB);
    robot.keyRelease(KeyEvent.VK_SHIFT);

    // move to the top of favorites list
    int i = 40;
    while (i-- > 0) {
        robot.keyPress(KeyEvent.VK_UP);
        robot.keyRelease(KeyEvent.VK_UP);
    }
    while (favorite-- > 0) {
        robot.keyPress(KeyEvent.VK_DOWN);
        robot.keyRelease(KeyEvent.VK_DOWN);
    }

    // Send an enter key to Select the selected folder
    robot.keyPress(KeyEvent.VK_ENTER);
    robot.keyRelease(KeyEvent.VK_ENTER);
}

0 个答案:

没有答案