Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<head>
  <meta charset="utf-8">
  <base href="https://polygit.org/components/">
  <script src="webcomponentsjs/webcomponents-lite.min.js"></script>
  <link href="polymer/polymer.html" rel="import">
</head>
<body>
  <dom-module id="fixtures-list">
    <template></template>
    <script>
      Polymer({
        is: 'fixtures-list',
        
        properties: {
          fromdate: {
            type: String,
            observer: '_logDate'
          }
        },
        
        _logDate: function () {
          console.log(this.fromdate);
        }
      });
    </script>
  </dom-module>
  
  <dom-module id="my-fixtures">
    <template>
      <fixtures-list fromdate="[[_requiredDay(24)]]"></fixtures-list>
    </template>
    <script>
        Polymer({
          is : 'my-fixtures',
          _requiredDay: function (offset) {
              // 1 day before now
              var d = new Date(new Date().getTime() - parseInt(offset) * 60 * 60 * 1000); 
              var n = d.toJSON();
              return n;
          }
        });
    </script>
  </dom-module> 
  
  <my-fixtures></my-fixtures>
  
</body>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers