File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/VueDatePicker/composables Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const useExternalInternalMapper = () => {
5656 } ;
5757 } ;
5858
59- const getMonthVal = ( date : Date ) : MonthModel | ModelTypeConverted => {
59+ const getMonthVal = ( date : Date ) : MonthModel | ModelTypeConverted | null => {
6060 if ( rootProps . modelType ) return toModelType ( date ) ;
6161 return { month : getMonth ( date ) , year : getYear ( date ) } ;
6262 } ;
@@ -261,8 +261,8 @@ export const useExternalInternalMapper = () => {
261261 return getDate ( value ) ;
262262 } ;
263263
264- const toModelType = ( val : Date ) : string | number | Date => {
265- if ( ! val ) return '' ;
264+ const toModelType = ( val : Date ) : string | number | Date | null => {
265+ if ( ! val ) return null ;
266266 if ( rootProps . modelType ) {
267267 if ( rootProps . modelType === 'timestamp' ) return + val ;
268268 if ( rootProps . modelType === 'iso' ) return val . toISOString ( ) ;
You can’t perform that action at this time.
0 commit comments