Share via

How to use datetimePicker in Sharepoint Framework?

Toriyama 291 Reputation points
2022-04-28T12:03:45.227+00:00

I'm trying to create a form with a choice field in a calendar, the famous datetimePicker.

I tried to use bootstrap with jquery as in this "https://getdatepicker.com/4/", but it didn't work.

I'm using a web part without Javascript Framework.

What can i do for resolve it?
Thank you

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint Server | Development

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2022-04-29T07:26:37.26+00:00

    Hi @Toriyama
    Since your framework is no javascript framework. There are javascript in the samples you provided. So the web part won't work. I will recommend you following code with no javascript.
    http://reshma-ustad.blogspot.com/2019/08/jquery-datepicker-in-spfx.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.