Rectangle 27 0

<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="utf-8" />
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <!-- Le styles -->
    <link data-require="bootstrap-css" data-semver="3.3.1" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
    <link data-require="bootstrap@*" data-semver="3.2.0" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css" />
    <style>
      body {
        padding-top: 60px;
      }
      @media (max-width: 979px) {

        /* Remove any padding from the body */
        body {
          padding-top: 0;
        }
      }
      .form-group {
        float:left;
        margin: 1.2em;
      }
    </style>
    <link href="style.css" rel="stylesheet" />
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="images/favicon.ico" />
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png" />
    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png" />
    <!-- Le javascript
    ================================================== -->
    <script data-require="jquery" data-semver="2.1.1" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script data-require="bootstrap" data-semver="3.2.0" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js"></script>
    <script src="script.js"></script>
  </head>

  <body>
    <div class="container">
      <form name="form" novalidate="" ng-submit="processForm()"
        class="form-inline">

      <div class="form-group col-md-4">
        <label class="control-label" for="location"><i class="glyphicon glyphicon-map-marker"></i> Location</label>
        <br/><input class="form-control" id="location" name="location" type="text" ng-model="location"
               ng-required="true"
               ng-autocomplete details="details" options="options" placeholder="Location"/>
      </div>
      <div class="form-group col-md-4">
        <label class="control-label" for="startDate"><i class="glyphicon glyphicon-calendar"></i> Pickup date</label>
        <br/><input class="form-control" id="startDate" name="startDate" type="text"
               datepicker-popup="{{format}}"
               ng-model="startDate"
               is-open="openedStart" datepicker-options="dateOptions"
               ng-required="true" close-text="Close" ng-click="openStart($event)"/>
      </div>
      <div class="form-group col-md-3">
        <label class="control-label" for="startTime"><i class="glyphicon glyphicon-time"></i> Pickup</label>
        <br/><select class="form-control" id="startTime" ng-model="selectedStartTime"
                ng-options="time.label for time in times"
                ng-required="true">
        </select>
      </div>
      <div class="form-group col-md-4">
        <label class="control-label" for="endDate"><i class="glyphicon glyphicon-calendar"></i> Dropoff date</label>
        <br/><input class="form-control" id="endDate" name="endDate" type="text"
               datepicker-popup="{{format}}"
               ng-model="endDate"
               is-open="openedEnd" min-date="startDate" datepicker-options="dateOptions"
               ng-required="true" close-text="Close" ng-click="openEnd($event)"/>
      </div>
      <div class="form-group col-md-3">
        <label class="control-label" for="endTime"><i class="glyphicon glyphicon-time"></i> Dropoff</label>
        <br/><select class="form-control" id="endTime" ng-model="selectedEndTime"
                ng-options="time.label for time in times"
                ng-required="true">
        </select>
      </div>
    <!--</div>-->
    <div class="row align-center">
      <input type="submit" value="Search" ng-disabled="form.$invalid" class="btn btn-primary" disabled="disabled"/>
    </div>
  </form>
    </div>
    <!-- /container -->
  </body>

</html>

html - Inline form in one row with labels above input fields - Stack O...

html css angularjs forms twitter-bootstrap-3
Rectangle 27 0

/****new min date code */
     $scope.dateChange = function(event){          
       var d= $scope.minDate1.setDate( $scope.dt.getDate() + 1);
       $scope.minDate1=new Date(d);
    }
     /****new min date code end */

  $scope.toggleMin = function() {
    $scope.minDate = $scope.minDate ? null : new Date();
       $scope.minDate1 = new Date();
  };
<h4>Start Date</h4>
    <div class="row">
        <div class="col-md-6">
            <p class="input-group">
              <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened1" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" ng-change="dateChange($event)"close-text="Close" />
              <span class="input-group-btn">
                <button type="button" class="btn btn-default" ng-click="open1($event)"><i class="glyphicon glyphicon-calendar"></i></button>
              </span>
            </p>
        </div>
    </div>
    <h4>End Date</h4>
    <div class="row">
        <div class="col-md-6">
            <p class="input-group">
              <input type="text" ng-disabled="!dt" class="form-control" datepicker-popup="{{format}}" ng-model="dt2" is-open="opened2" min-date="minDate1" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
              <span class="input-group-btn">
                <button type="button" ng-disabled="!dt" class="btn btn-default" ng-click="open2($event)"><i class="glyphicon glyphicon-calendar"></i></button>
              </span>
            </p>
        </div>
    </div>

@fidev .,when you use Dynamic min-date attribute value be carefully . it may causing validation error when you submit form if you hot handled it correctly .

$scope.dateChange = function(event){  			var d = new Date(); 			$scope.minDate1 = d.setDate($scope.dt.getDate() + 1); 	    };

javascript - Multiple Datepickers / Min Date Bootstrap Angular Datepic...

javascript angular-ui-bootstrap
Rectangle 27 0

$scope.open1 = function($event) {
    $event.preventDefault();
    $event.stopPropagation();

    $scope.opened1 = true;
    $scope.opened2 = false;
    };

    $scope.open2 = function($event) {
    $event.preventDefault();
    $event.stopPropagation();
    $scope.opened1 = false;
    $scope.opened2 = true;
    };

Ah I see - thanks. that works nicely now. However I still haven't worked out how to increment the start date. My second issue above - any ideas?

hi @fidev you can use min-date attribute

min-date="dt + 1"
var d = date; d.setDate(d.getDate() + no_days); dt= d;

javascript - Multiple Datepickers / Min Date Bootstrap Angular Datepic...

javascript angular-ui-bootstrap