Search
 
SCRIPT & CODE EXAMPLE
 

HTML

ngbdatepicker disable input

<h1>Disabling and limiting dates</h1>
<!-- You can limit the dates available for navigation and selection using [minDate] and [maxDate] inputs. If you don't specify any of them, you'll have infinite navigation and the year select box will display [-10, +10] years from currently visible month. -->
<!-- If you want to disable some dates for selection (ex. weekends), you have to provide the [markDisabled] function that will mark certain dates not selectable. It will be called for each newly visible day when you navigate between months. -->
<!-- ex. disable the 13th of each month -->

<script>
const isDisabled = (date: NgbDate, current: {month: number}) => date.day === 13;
</script>

<ngb-datepicker [minDate]="{year: 2010, month: 1, day: 1}"
                [maxDate]="{year: 2048, month: 12, day: 31}"
                [markDisabled]="isDisabled">
</ngb-datepicker>
Comment

PREVIOUS NEXT
Code Example
Html :: table header html 
Html :: ng for 
Html :: align button on bottom of div 
Html :: html lang attribute 
Html :: display date on html 
Html :: how to add bg html 
Html :: boilerplate code in html 
Html :: cambiar src jquery 
Html :: onclick on input type checkbox field 
Html :: The <select Element 
Html :: muted not working in video tag angular 
Html :: which is right <hr or <hr/ in html 
Html :: html svg 
Html :: hello world svelte 
Html :: split screen html 
Html :: email full width images 
Html :: html preview pdf file 
Html :: bootstap5 card 
Html :: same form two submits 
Html :: fork me on github ribbon 
Html :: vertical line navigation bar 
Html :: bulma css lighter buttons 
Html :: to ensure user input is a link in html 
Html :: html add title 
Html :: bootsrap cards 
Html :: html image buffer to base64 
Html :: ins html 
Html :: emoji css 
Html :: decode html entities 
Html :: <span class="border"</span <span class="border-top"</span <span class="border-end"</span <span class="border-bottom"</span <span class="border-start"</span 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =