<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
<h3>Vue Js Date Time Picker Example</h3>
<input type="datetime-local" v-model="selectedDateTime">
<p v-if="selectedDateTime">Selected Date and Time: {{selectedDateTime}}</p>
</div>
<script type="module">
const app = new Vue({
el: "#app",
data() {
return {
selectedDateTime: null
};
},
});
</script>
<style scoped>
#app {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 50px;
}
h3 {
margin-bottom: 20px;
}
input[type="datetime-local"] {
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
width: 300px;
}
p {
margin-top: 20px;
font-size: 18px;
}
</style>
</body>
</html>