Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add umd usage example index.html with the latest version #294

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions docs/examples/umd/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!-- also @https://codepen.io/yordangeorgiev/pen/xxwNeJL -->
<html>
<head> <title>vue-ctk-date-time-picker-02</title>

<style>
html, body {
overflow-x: hidden;
max-width: 100%;
font-family: Helvetica Neue, Arial, sansserif;
height: 1000px;
}
</style>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-ctk-date-time-picker.css">
</head>

<body>
<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-ctk-date-time-picker.umd.min.js" charset="utf-8"></script>
<div id="app" style="fontsize: 7em">
<vue-ctk-date-time-pic :label="start_time" id="start_time_control" :value="time"> </vue-ctk-date-time-pic>
<vue-ctk-date-time-pic :label="stop_time" id="stop_time_control" :value="time"> </vue-ctk-date-time-pic>
</div>

<script type="text/x-template" id="vue-ctk-date-time-picker-tpl">
<vue-ctk-date-time-picker :format="'YYYY-MM-DD HH:mm'" :formatted="'YYYY-MM-DD HH:mm'" :label="'Select date'"
v-model="value" :first-day-of-week="1" :no-weekends-days="false">
</vue-ctk-date-time-picker>
</script>

<script>
var valVueDtPick = Vue.component('vue-ctk-date-time-pic', {
template: "#vue-ctk-date-time-picker-tpl"
, data: function () {
return {
value: null
}
},
methods: {
log: function (val) {
console.log(val)
}
},
components: { 'datetime-picker': Vue.component('vue-ctk-date-time-picker', window['vue-ctk-date-time-picker'])}
})

new Vue({
el: "#app"
, data: function () {
return {
time: null
}
},
components: { 'vue-ctk-date-time-pic': valVueDtPick}
})
</script>



<div>
<p> this page demonstrates the following : </p>
<pre>
- umd usage of vue-ctk-date-time-picker from CDN - https://www.jsdelivr.com/package/npm/vue-ctk-date-time-picker?path=dist
- iso-8601 :formatted="'YYYY-MM-DD HH:mm'" for the string in the inputs
- use monday as the first day of the week
- :no-weekends-days="false" - can be set to true and the user cannot select the days
- extend the vue-ctk-date-time-picker via custom template
</pre>
</body>
</html>
28 changes: 21 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.