screen_rotation
Copied to Clipboard
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <p>Click here to open the date picker</p> <div class="date-chips"> <div class="date-chip" v-for="date in dates" :key="date"> {{ date }} </div> </div> <input type="date" v-model='selectedDate' @change="addDate" class="custom-date-input" /> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { selectedDate: null, dates: [], }; }, methods: { addDate() { this.dates.push(this.selectedDate); } } }); </script> <style> .custom-date-input { font-size: 16px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; } .date-chips { display: flex; flex-wrap: wrap; align-items: center; } .date-chip { background-color: #333; color: #fff; padding: 0.5em 1em; margin: 0.5em; border-radius: 1em; display: flex; align-items: center; justify-content: center; font-size: 14px; } </style> </body> </html>