72
Views
4
Comments
Solved
Datepicker
Question
Application Type
Reactive

How do I remove previous month and next month date ? Eg 28,29,30,31 and 1,2,3,4,5,6,7,8 Is there any java script for this?


Desired Output 

2023-10-23 05-14-43
Pradeep Patil
Solution

Hello,

CSS to hide prev/next months days :

.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay {
  visibility: hidden;
}

Use this CSS, or you can inspect the element to find out the class and apply CSS.


Regards

2024-05-02 09-49-04
Murali Manoharan V
Champion

Hi @Siddharth Vyas 


Instead of using input field with date as datatype. There is one Outsystems default widget is there, known as datepicker. By using that widget you can use min and max date in their properties.

I hope it will be useful for you.


Regards 

Murali

2022-06-23 06-21-50
Siddharth Vyas

Hi I am aware about this.But I have implemented customised datepicker with Input Icon

2026-02-26 06-29-24
Rahul
 
MVP

Hi @Siddharth Vyas ,

Outsystem DatePicker is used as a flatpicker calendar and there is no option to hide pre and next-month dates.

https://flatpickr.js.org/examples/


If you want you can use DatePicker from date picker js.

below is the example

https://jsfiddle.net/scottcwilson/phkkt20e/2/


Hope this will help you.

2023-10-23 05-14-43
Pradeep Patil
Solution

Hello,

CSS to hide prev/next months days :

.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay {
  visibility: hidden;
}

Use this CSS, or you can inspect the element to find out the class and apply CSS.


Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.