pnp / sp-dev-fx-webparts

SharePoint Framework web part, Teams tab, personal app, app page samples
http://aka.ms/spfx-webparts
MIT License
2.03k stars 3.83k forks source link

react-birthdays - Unable to display Birthdays on the site #2702

Open bakgou1 opened 2 years ago

bakgou1 commented 2 years ago

Disclaimer

Yes

Sample

react-birthdays

Author(s)

@smaity @joaojmendes

Question

Hello, I've followed the steps instructed in the readme.txt file and successfully added the app to the tenant sharepoint site. I've created a list called "Birthdays" and inserted data. After adding the web part in my communication site, the birthday cards are not displaying. Is there any assistance I can get from here? All I see this empty birthdays even though there are birthdays added for future date.

image

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Abderahman88 commented 2 years ago

Hi @bakgou1,

1) Have you create the Birthdays-list on the root site? (https://[tenant].sharepoint.com/Lists/Birthdays/AllItems.aspx) 2) Is the month of the birthday passed? Can you give some sample dates?

image

bakgou1 commented 2 years ago

Hello @Abderahman88,

  1. Yes, I did create the list on the root directory as shown below.

image

  1. Please see my list above. It does contain future dates only.

My webpart is blank as shown below.

image

Hope this helps! Let me know if you need further info.

Abderahman88 commented 2 years ago

@bakgou1

1) Are you using the lastest version of this webpart? 2) What version of Node are you running? 3) Do you get any errors when running gulp serve?

Abderahman88 commented 2 years ago

Something else came in mind ... Have you approved all the API permissions in SharePoint admin center ?

image

bakgou1 commented 2 years ago

Hi @Abderahman88, Yes, I have approved all API Permissions via the Admin center.

I'm running v14.19.1 node version using the latest version of the webpart.

I'm doing a new setup right now and will let you know if I run into any errors after running gulp serve command.

bakgou1 commented 2 years ago

Hello @Abderahman88, I did ran the gulp serve command after the setup with no errors. I get "No Birthdays and anniversaries for next days" even though my list is on the root site with records. What should be the field types? Does the "Birthday" column in DateTime format?

Abderahman88 commented 2 years ago

@bakgou1

image

Abderahman88 commented 2 years ago

@bakgou1 The latest version of this webpart has issues. If I have any time, I'll try to fix it.

bakgou1 commented 2 years ago

@Abderahman88 Thank you! Let me know when you've fixed it.

nethitters commented 2 years ago

I managed to get it working temporarily by changing the year from 2000 to 2022 in SPService.ts and using moment to reformat the dates to MM/DD/YYYY. I would try and make a more permanent fix but if @Abderahman88 is already working on it, I'm sure he would do a better job.

joostvdlinden commented 1 year ago

I managed to get it working temporarily by changing the year from 2000 to 2022 in SPService.ts and using moment to reformat the dates to MM/DD/YYYY. I would try and make a more permanent fix but if @Abderahman88 is already working on it, I'm sure he would do a better job.

Hi @nethitters I am following up on your remark about date formatting. Since the latest release of this web part I am facing dates not being localized to Dutch but they show in English. How do you apply this date formatting?

Pandas4Peace commented 1 year ago

@nethitters I am also following up on your remark about date formatting. Do you mind sharing how you reformatted the dates in SPService.ts?

Gaston77lqq commented 1 year ago

Was there any solution?