Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

Creating a year field in form

(0) ShareShare
ReportReport
Posted on by 309

I am trying to create a field that will capture just the year. I have added a date field. But, is there a way to convert the date picker to a year picker or at least only display the year even though a date was picked.

 

prathyoo_0-1689075568154.png

 

Categories:
  • Fubar Profile Picture
    7,964 Super User 2025 Season 1 on at
    Re: Creating a year field in form

    You can change the format of the selected date, but that is the closest you would be able to get (this only changes the display the actual value is still a date)

    $('#yourdatefield').next().data("DateTimePicker").format('YYYY');

     

    You are probably better off just creating a new Table load it with the years and then put a Lookup to the table on your dataverse form, then in the Portal forms's metadata create an item for the lookup field and set it to render as a dropdown.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43