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" ng-app="modalTest" ng-controller="dialogTestCtrl">
  <div class="row">
    <div class="col-md-12">
      <h1>Dialog Custom Service with Date Picker Demo</h1>
      <p>Testing whether another directive in a custom dialog works properly.  In this demo we'll use the Date Picker directive that comes with Angular-UI-Bootstrap.</p>
  <div class="row">
    <div class="col-md-12">
      <button class="btn btn-primary" ng-click="launch()">Launch Custom Dialog</button>
  <div class="row">
    <div class="col-md-12">
      <p>Date Picked: <span class="text-info">{{data.dt | date:'fullDate' }}</span></p>

    //== Variables ==//
    $scope.data = {
      dt: new Date()
    //== Methods ==//
    $scope.launch = function(){
      var dlg = dialogs.create('/dialogs/custom.html','customDialogCtrl',$scope.data);
        $scope.data = data;
    }; // end launch
  }) // end dialogTest

    $scope.data = data;
    $scope.opened = false;
    //== Listeners ==//
      $log.info('Date Changed: ' + val);
      $scope.opened = false;
    //== Methods ==//
    $scope.setDate = function(){
        $scope.data.dt = new Date(); // today
    $scope.open = function($event){
      $scope.opened = true;
    }; // end open
    $scope.done = function(){
    }; // end done
  }) // end customDialogCtrl

    // this provider is only available in the 4.0.0+ versions of angular-dialog-service
  }) // end config

    $templateCache.put('/dialogs/custom.html','<div class="modal-header"><h4 class="modal-title">Date Picker Test</h4></div><div class="modal-body"><p class="input-group"><input type="text" class="form-control" datepicker-popup="dd-MMMM-yyyy" ng-model="data.dt" datepicker-mode="year" is-open="opened" show-button-bar="false" /><span class="input-group-btn"><button class="btn btn-default" ng-click="open($event)"><span class="glyphicon glyphicon-calendar"></span></button></span></p></div><div class="modal-footer"><button class="btn btn-default" ng-click="done()">Done</button></div>');
  }); // end run

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................