Skip to content

Instantly share code, notes, and snippets.

@JeroenVinke
Forked from adriatic/app.html
Last active April 27, 2016 09:19
Show Gist options
  • Save JeroenVinke/e2769b4244d71d2f27e87961f90d6574 to your computer and use it in GitHub Desktop.
Save JeroenVinke/e2769b4244d71d2f27e87961f90d6574 to your computer and use it in GitHub Desktop.
Datepicker: events
<template>
<div class="navbar txt-grey" role="navigation">
<div class="navbar-header">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><b>Dropdown</b><b class="caret"></b></a>
<ul class="dropdown-menu">
<div>
<form method="POST" class="form">
<div class="field clear">
Date
<input id="datepicker" ak-datepicker="k-widget.two-way: datepicker"
style="width: 100%" />
</div>
<button type="submit" name="res_submit">Go</button>
</form>
</div>
</ul>
</li>
</ul>
</div>
</div>
</template>
import {TaskQueue} from 'aurelia-task-queue';
import {inject} from 'aurelia-dependency-injection';
@inject(TaskQueue)
export class Events {
constructor(taskQueue) {
this.taskQueue = taskQueue;
}
attached() {
this.taskQueue.queueTask(() => {
$('#datepicker, #datepicker_dateview').click(function(e){
e.stopPropagation();
});
});
}
}
<!doctype html>
<html>
<head>
<title>Aurelia KendoUI bridge</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.mobile.all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2016.1.226/js/jszip.min.js"></script>
</head>
<body aurelia-app="main">
<h1>Loading...</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script>
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/0.3.5/config2.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro());
aurelia.start().then(a => a.setRoot());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment