Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Fb7+cBYX+cOIvvBN6FoeGh
Power Apps - Building Power Apps
Unanswered

Fluent UI Datepicker border color change

Like (0) ShareShare
ReportReport
Posted on 13 Mar 2023 14:06:03 by 39

Hi Champions 

 

I have a form with all classic text inputs and fluent date picker, date picket border color is too light, can we make it little strong and dark of the boarder. 

 

Thanks in advance. 

Categories:
  • Community Power Platform Member Profile Picture
    on 29 Apr 2023 at 00:36:18
    Re: Fluent UI Datepicker border color change

    Actually you can manipulate the Fluent UI Datepicker e.g. as suggested in this post: https://butenko.pro/2022/09/19/applying-uci-styling-to-a-fluentui-datepicker-component/

    Basically you can use the developer tools to find the classes or ids of the elements that you want to manipulate.

    A Datepicker I am working on right now looks like this (leaving out some details):

    const datePickerStyles: IStyleFunctionOrObject<IDatePickerStyleProps, IDatePickerStyles> = {
     textField: {
     '& input': {
     // Normal edit mode colors
     color: textColor,
     backgroundColor: fillColor,
    
     // Font
     fontFamily: fontFamily,
     fontSize: `${fontSize}px`,
     fontWeight: `${fontWeight}`,
     fontStyle: `${fontStyle}`,
     },
     // Border
     '& .ms-TextField-fieldGroup': {
     borderWidth: `${borderWidth}px`,
     borderStyle: `${borderStyle}`,
     borderColor: `${borderColor}`,
     borderRadius: `${borderRadius}px`,
     overflow: 'hidden',
     },
     '& .ms-TextField:focus-visible': {
     outline: 'none'
     },
     // Icon
     icon: {
     iconName: 'BsCalendar2',
     },
     '& i': {
     color: iconColor
     },
     // Placeholder
     '& input::placeholder': {
     color: placeHolderColor,
     fontFamily: fontFamily,
     fontSize: `${fontSize}px`,
     fontWeight: `${fontWeight}`,
     fontStyle: `${fontStyle}`,
     }
     }
     };

     

     <DatePicker
     firstDayOfWeek={DayOfWeek.Monday}
     placeholder='- Select date -'
     allowTextInput
     ariaLabel='Select a date'
     strings={defaultDatePickerStrings}
     onSelectDate={(date) => handleOnSelectDate(date)}
     value={value}
     styles={datePickerStyles}
     textField={{ iconProps: { iconName: 'BsCalendar2' } }}
     // called twice on select date, and once everytime when loosing focus of the box
     formatDate={(date) => onFormatDate(date, locale, options)}
     parseDateFromString={onParseDateFromString}
     ></DatePicker>

     

  • iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on 13 Mar 2023 at 15:29:10
    Re: Fluent UI Datepicker border color change

    If you really need this change then I would suggest replacing the fluent datepicker with a canvas component such as @PowerAddict's Date Picker Control component:

    Reusable Revamped Date Picker Control v3 - Power Platform Community (microsoft.com)

  • iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on 13 Mar 2023 at 14:48:13
    Re: Fluent UI Datepicker border color change

    It's not possible to do this with the modern Fluent UI datepicker control.

  • Innrg Profile Picture
    39 on 13 Mar 2023 at 14:24:08
    Re: Fluent UI Datepicker border color change

    Thanks for your quick response, but the Border I am looking for Fluent date picker. 

  • wshalex123 Profile Picture
    160 on 13 Mar 2023 at 14:12:19
    Re: Fluent UI Datepicker border color change

    wshalex123_0-1678716716210.png

    Change thickness of the border and/or the color in the properties

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 98 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 60

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard