JSFiddle - React, Tailwind, and code Playground

by ckosloski

HTML

<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-sanitize.min.js"></script>
<script src="http://vitalets.github.io/angular-xeditable/dist/js/xeditable.js"></script>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="http://vitalets.github.io/angular-xeditable/dist/css/xeditable.css">
<script src="https://kendo.cdn.telerik.com/2017.2.621/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.common.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.2.621/styles/kendo.blueopal.min.css">
<div ng-app="app" ng-controller="Ctrl">

  <div>
    <a href="" editable-kendo-date="vm.date" onbeforesave="beforeSave()" onaftersave="afterSave()" e-k-options="options" blur="submit">{{ vm.date || 'empty' }}</a>
  </div>

  <!--
  <div>
    <input kendo-date-picker k-ng-model="vm.date"/>
  </div> 
  -->


</div>

CSS

div[ng-app] {
  margin: 50px;
}

JavaScript

var app = angular.module("app", ["xeditable", "kendo.directives"]);

app.run(function(editableOptions) {
  editableOptions.theme = 'bs3';
});

angular.module('xeditable').directive('editableKendoDate', ['editableDirectiveFactory',
  function(editableDirectiveFactory) {
    return editableDirectiveFactory({
      directiveName: 'editableKendoDate',
      inputTpl: '<input kendo-date-picker />',
      render: function() {

        this.parent.render.call(this);
        this.inputEl.removeAttr('ng-model');
        this.inputEl.attr('k-ng-model', '$parent.$data');
      }


    });
  }
]);

app.controller('Ctrl', function($scope) {
  $scope.vm = {
		date: new Date()
  };

  $scope.options = {

  }

  $scope.afterSave = function() {
    debugger;
  }
  $scope.beforefterSave = function() {
    debugger;
  }
});