|
|
@ -15,7 +15,7 @@ interface Props { |
|
|
|
} | null |
|
|
|
} | null |
|
|
|
isCellInputField?: boolean |
|
|
|
isCellInputField?: boolean |
|
|
|
pickerType?: 'date' | 'time' | 'year' | 'month' |
|
|
|
pickerType?: 'date' | 'time' | 'year' | 'month' |
|
|
|
showCurrentDateOption?: boolean |
|
|
|
showCurrentDateOption?: boolean | 'disabled' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), { |
|
|
|
const props = withDefaults(defineProps<Props>(), { |
|
|
@ -255,15 +255,20 @@ const paginate = (action: 'next' | 'prev') => { |
|
|
|
<NcButton class="nc-date-picker-now-btn !h-7" size="small" type="secondary" @click="handleSelectDate(dayjs())"> |
|
|
|
<NcButton class="nc-date-picker-now-btn !h-7" size="small" type="secondary" @click="handleSelectDate(dayjs())"> |
|
|
|
<span class="text-small"> {{ $t('labels.today') }} </span> |
|
|
|
<span class="text-small"> {{ $t('labels.today') }} </span> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
<NcButton |
|
|
|
<NcTooltip v-if="showCurrentDateOption" :disabled="showCurrentDateOption !== 'disabled'"> |
|
|
|
v-if="showCurrentDateOption" |
|
|
|
<template #title> |
|
|
|
class="nc-date-picker-now-btn !h-7" |
|
|
|
{{ $t('tooltip.currentDateNotAvail') }} |
|
|
|
size="small" |
|
|
|
</template> |
|
|
|
type="secondary" |
|
|
|
<NcButton |
|
|
|
@click="emit('currentDate')" |
|
|
|
class="nc-date-picker-current-date-btn !h-7" |
|
|
|
> |
|
|
|
size="small" |
|
|
|
<span class="text-small"> {{ $t('labels.currentDate') }} </span> |
|
|
|
type="secondary" |
|
|
|
</NcButton> |
|
|
|
:disabled="showCurrentDateOption === 'disabled'" |
|
|
|
|
|
|
|
@click="emit('currentDate')" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<span class="text-small"> {{ $t('labels.currentDate') }} </span> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|