web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fluent UI Datepicker b...
Power Apps
Unanswered

Fluent UI Datepicker border color change

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • wshalex123 Profile Picture
    160 on at

    wshalex123_0-1678716716210.png

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

  • Innrg Profile Picture
    39 on at

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

  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

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

  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    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)

  • Community Power Platform Member Profile Picture
    on at

    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>

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard