Pastel Flatpickr - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pastel Flatpickr</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flatpickr/4.6.9/flatpickr.min.css"> <style> .pastel-flatpickr { font-family: 'Arial', sans-serif; padding: 10px; font-size: 1.2em; width: 100%; max-width: 300px; border: 2px solid #FFB6C1; border-radius: 5px; box-shadow: 0 5px 15px rgba(255, 182, 193, 0.5); transition: all 0.3s ease; margin-left: 40%; margin-top: 200px; } .pastel-flatpickr:focus { outline: none; border-color: #FFDAB9; box-shadow: 0 0 10px rgba(255, 218, 185, 0.5); } .flatpickr-calendar { font-family: 'Arial', sans-serif; border-radius: 10px; box-shadow: 0 10px 25px rgba(255, 218, 185, 0.5); overflow: hidden; width: 330px; } .flatpickr-months { background: linear-gradient(45deg, #FFB6C1 0%, #FFDAB9 100%); color: #fff; padding: 10px; } .flatpickr-days { background: #fffaf0; padding: 10px; } .flatpickr-day { width: 40px; height: 40px; line-height: 40px; margin: 5px; color: #000; transition: all 0.2s ease; } .flatpickr-day:hover { background: #FFDAB9; color: #fff; transform: scale(1.1); } .flatpickr-day.today { background: #FFB6C1; color: #fff; } .flatpickr-day.selected { background: #FF69B4; color: #fff; border-radius: 50%; } .flatpickr-weekday { font-weight: bold; color: #FFB6C1; } @keyframes pastelFade { from { opacity: 0; } to { opacity: 1; } } .flatpickr-calendar { animation: pastelFade 0.3s ease; } .flatpickr-prev-month svg, .flatpickr-next-month svg { fill: #fff; } .flatpickr-prev-month::before, .flatpickr-next-month::before { content: "🌸"; margin-right: 5px; } </style> </head> <body> <input type="text" id="datepicker-pastel" class="pastel-flatpickr" placeholder="Pick a date"> <script src="https://cdnjs.cloudflare.com/ajax/libs/flatpickr/4.6.9/flatpickr.min.js"></script> <script> document.addEventListener('DOMContentLoaded', function() { flatpickr("#datepicker-pastel", { dateFormat: "Y-m-d", disableMobile: "true", onReady: function(selectedDates, dateStr, instance) { instance.calendarContainer.classList.add('animated', 'pastelFade'); } }); }); </script> </body> </html>