Repository navigation
zealous_ride
# Release Notes for Dinaank - Version 2.0.7: zealous_ride 🚀
## Overview
Dinaank is a lightweight date picker library for JavaScript/TypeScript, designed to make date and time selection a breeze! This release focuses on enhancing the date/time selection features, ensuring a more flexible and user-friendly experience.
## Features 🌟
- **Null Support for Selected Date**:
- Added the ability to handle `null` as a valid selected date in the `DateSelector`. This allows users to clear the selected date easily, enhancing usability.
- **Implementation Detail**: The internal state management now accommodates `null` values, ensuring that the date picker behaves correctly when no date is selected.
```javascript
const datePicker = new DateSelector({
selectedDate: null, // Now supports null
onDateChange: (date) => {
console.log(date); // Will log null if no date is selected
}
});Improvements 🔧
- Enhanced Date Handling:
- Improved the internal date parsing logic to better handle edge cases, ensuring that users can select dates without unexpected behavior.
Fixes 🐛
- Bug Fixes:
- Resolved issues related to date formatting when
nullwas passed, ensuring consistent behavior across the library.
- Resolved issues related to date formatting when
Breaking Changes ⚠️
-
DateSelectorOptions Interface Update:
- The
DateSelectorOptionsinterface has been updated to allowselectedDateto benull. Ensure to update your implementations accordingly.
interface DateSelectorOptions { selectedDate: Date | null; // Now accepts null onDateChange: (date: Date | null) => void; // Updated to reflect nullability }
- The
Performance Metrics 📈
- Size: The library remains lightweight at 4.9kb gzipped, ensuring fast load times and minimal impact on performance.
Installation Instructions 📦
You can install Dinaank via npm, yarn, or use a CDN:
NPM
npm install dinaankYarn
yarn add dinaankCDN
<script src="https://cdn.jsdelivr.net/npm/dinaank@2.0.7/dist/dinaank.min.js"></script>Dependencies 🚫
- Zero Dependencies: This release maintains the zero-dependency nature of the library, ensuring a lightweight footprint.
Security Notes 🔒
- Ensure that any date handling logic in your application properly validates and sanitizes user input to prevent potential security issues.
Contributors 🙌
A big thank you to all contributors for their valuable input and feature requests that helped shape this release! Your feedback is crucial in making Dinaank better.
Visualizing Date Selection Flow 🌐
graph TD;
A[User Interaction] --> B{Select Date};
B -->|Valid Date| C[Update State];
B -->|Clear Date| D[Set to Null];
C --> E[Trigger onDateChange];
D --> E;Conclusion
With this release, Dinaank continues to evolve, providing a fun and efficient way to handle date and time selection in your applications. Enjoy the new features and happy coding! 🎉