surveyjs / custom-widgets

The collection of custom widgets for SurveyJS: Survey Library and Survey Creator :package:
https://surveyjs.io
MIT License
79 stars 78 forks source link

About third-party date and time widgets #198

Open fengzhihenxs opened 4 years ago

fengzhihenxs commented 4 years ago

Now the officially supported third-party date widget is bootstrap datepicker, but bootstrap datepicker cannot set the time part. Is there a way to support bootstrap datetimepicker, so that a widget date, time, datetime can be supported.

tsv2013 commented 4 years ago

Yes, you can implement a custom date time picker widget using the https://github.com/surveyjs/widgets/blob/master/src/bootstrapdatepicker.js widget code as a basis.

fengzhihenxs commented 4 years ago

@tsv2013 Thank you very much, I have implemented bootstrap datatimepicker. After the implementation, there is a small problem that needs to be asked to you: When the scroll bar appears in the survey container, scroll the scroll bar of the survey container, the datatimepicker window is fixed on the current page, and does not move with the scroll bar, but when the survey container does not appear the scroll bar When scrolling the scroll bar of the survey container, the datatimepicker window moves with the scroll bar. I think this is not reasonable. Is there a solution?

This is an example:https://plnkr.co/edit/lPfGBzQpEa98Gbch?preview

fengzhihenxs commented 4 years ago

Just now is the bootstrap datepicker example, which is also true. The following is the case of bootstrap datatimepicker. image

tsv2013 commented 4 years ago

@fengzhihenxs for some reason I think it’s caused by bootstrap... propably popup container is misplaced

sirajansari3 commented 3 years ago

@tsv2013 Hi, I am trying to add one of the custom widget to survey creator toolbox but getting failed...plz help. i m referring this example https://codesandbox.io/s/crazy-rain-3wqj7?file=/src/customwidget.js

tsv2013 commented 3 years ago

Answered here - https://surveyjs.answerdesk.io/ticket/details/t5959/unable-to-add-custom-widget-to-creator-toolbox

Mahesh4Providence commented 3 years ago

Hello @fengzhihenxs , Could you share the widget.js code for bootstrap datatimepicker .