<commit_before><!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">

  <title>paper-date-picker Demo</title>
  
  <script src="../../webcomponentsjs/webcomponents-lite.js"></script>

  <link rel="import" href="../paper-date-picker.html">
  <link rel="import" href="../../paper-styles/paper-styles.html">
  <link rel="import" href="../../paper-dialog/paper-dialog.html">
  <link rel="import" href="../../paper-button/paper-button.html">

  <style is="custom-style">
    html /deep/ * {
    }
    body {
      @apply(--paper-style-font-body1);
      color: #333;
    }
    section {
      margin: 24px;
    }
    h1 {
      @apply(--paper-font-display2);
    }
  </style>
</head>
<body unresolved>
  <template is="dom-bind" id="scope">
    <section>
      <h1>{{dateFormat(date, 'LL')}}</h1>
      <paper-button class="btn" on-tap="showDialog" raised>Change Date</paper-button>
      <paper-dialog id="dialog" class="paper-date-picker-dialog" modal on-iron-overlay-closed="dismissDialog">
        <paper-date-picker id="picker" responsive-width="655px"></paper-date-picker>
        <div class="buttons">
          <paper-button dialog-dismiss>Cancel</paper-button>
          <paper-button dialog-confirm>OK</paper-button>
        </div>
      </paper-dialog>
    </section>
  </template>
  <script>
    document.addEventListener('WebComponentsReady', function() {
      var scope = Polymer.dom(document).querySelector('#scope');
      scope.dateFormat = scope.$.picker.dateFormat;
      scope.dismissDialog = function() {
        scope.date = scope.$.picker.date;
      },
      scope.showDialog = function() {
        this.$.dialog.toggle();
      };
      scope.date = new Date();
    });
<commit_msg>fixed demo dialog cancel/ok button actions<commit_after><!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">

  <title>paper-date-picker Demo</title>
  
  <script src="../../webcomponentsjs/webcomponents-lite.js"></script>

  <link rel="import" href="../paper-date-picker.html">
  <link rel="import" href="../../paper-styles/paper-styles.html">
  <link rel="import" href="../../paper-dialog/paper-dialog.html">
  <link rel="import" href="../../paper-button/paper-button.html">

  <style is="custom-style">
    html /deep/ * {
    }
    body {
      @apply(--paper-style-font-body1);
      color: #333;
    }
    section {
      margin: 24px;
    }
    h1 {
      @apply(--paper-font-display2);
    }
  </style>
</head>
<body unresolved>
  <template is="dom-bind" id="scope">
    <section>
      <h1>{{dateFormat(date, 'LL')}}</h1>
      <paper-button class="btn" on-tap="showDialog" raised>Change Date</paper-button>
      <paper-dialog id="dialog" class="paper-date-picker-dialog" modal on-iron-overlay-closed="dismissDialog">
        <paper-date-picker id="picker" responsive-width="655px"></paper-date-picker>
        <div class="buttons">
          <paper-button dialog-dismiss>Cancel</paper-button>
          <paper-button dialog-confirm>OK</paper-button>
        </div>
      </paper-dialog>
    </section>
  </template>
  <script>
    document.addEventListener('WebComponentsReady', function() {
      var scope = Polymer.dom(document).querySelector('#scope');
      scope.dateFormat = scope.$.picker.dateFormat;
      scope.dismissDialog = function(event) {
        if (event.detail.confirmed) {
          scope.date = scope.$.picker.date;
        }
      };
      scope.showDialog = function() {
        this.$.dialog.toggle();
      };
      scope.date = new Date();
    });

{'fraction_non_alphanumeric': 0.18942157373632101, 'fraction_numerical': 0.009379885356956748, 'mean_word_length': 2.961816305469556, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5062509', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1221, 'n_words': 197}