cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="container m--top">
  <div style="max-width:300px">
    <div class="panel panel-default">
      <div class="panel-heading">DOB input</div>
      <div class="panel-body">
        <form id="js-form">

          <div class="form-group">
            <label for="dobUk" class="control-label">Enter your date of birth</label>
            <input id="dobUk" name="dobUk" class="form-control input-lg js-date--west" type="text" placeholder="_ _ /_ _ /_ _ _ _">
            <p class="help-block">E.g. dd/mm/yyyy</p>
          </div>
          <hr>
          <div class="form-group">
            <label for="dobUs" class="control-label">Enter your date of birth</label>
            <input id="dobUs" name="dobUs" class="form-control input-lg js-date--west" type="text" placeholder="_ _ /_ _ /_ _ _ _">
            <p class="help-block">E.g. mm/dd/yyyy</p>
          </div>
          <hr>
          <div class="form-group">
            <label for="dobJp" class="control-label">あなたの生年月日を入力してください</label>
            <input id="dobJp" name="dobJp" class="form-control input-lg js-date--japan" type="text" placeholder="_ _ _ _年_ _月_ _日">
            <p class="help-block">例:1990年03月31日</p>
          </div>
          <hr>
          <div class="form-group">
            <label for="dobEs" class="control-label">Ingresa tu fecha de nacimiento</label>
            <input id="dobEs" name="dobEs" class="form-control input-lg js-date--europe" type="text" placeholder="_ _ - _ _ - _ _ _ _">
            <p class="help-block">Por ejemplo. dd-mm-yyyy</p>
          </div>

        </form>
      </div>
      <!--<div class="panel-footer"><button class="btn btn-success btn-block btn-lg">Submit</button></div>
    </div>-->
  </div>
            
          
!
            
              body {
  font-family: 'Roboto', sans-serif;
}

.container {
  max-width: 330px;
  margin: 0 auto;
}

.m--top {
  margin-top: 50px;
}
            
          
!
            
              $(document).ready(function() {
  $('.js-date--west').mask('00/00/0000');
  $('.js-date--europe').mask('00-00-0000')
  $('.js-date--japan').mask('0000年00月00日');
  // Validation
  $('#js-form').formValidation({
    framework: 'bootstrap',
    icon: {
      valid: 'glyphicon glyphicon-ok',
      invalid: 'glyphicon glyphicon-remove',
      validating: 'glyphicon glyphicon-refresh'
    },
    fields: {
      dobUk: {
        trigger: 'blur',
        validators: {
          notEmpty: {
            message: 'Your date of birth is required'
          },
          date: {
            format: 'DD/MM/YYYY',
            message: 'Your date of birth is not valid'
          }
        }
      },
      dobEs: {
        trigger: 'blur',
        validators: {
          notEmpty: {
            message: 'Se requiere su fecha de nacimiento'
          },
          date: {
            format: 'DD-MM-YYYY',
            message: 'Su fecha de nacimiento no es válida'
          }
        }
      },
      dobUs: {
        trigger: 'blur',
        validators: {
          notEmpty: {
            message: 'Your date of birth is required'
          },
          date: {
            format: 'MM/DD/YYYY',
            message: 'Your date of birth is not valid'
          }
        }
      },
      dobJp: {
        trigger: 'blur',
        validators: {
          notEmpty: {
            message: '生年月日が必要となります'
          },
          stringLength: {
            min: 11,
            max: 11,
            message: '生年月日は有効ではありません'
          }
        }
      }
    }
  });
});
            
          
!
999px
Loading ..................

Console