最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to install a Flatpickr plugin - Stack Overflow

programmeradmin1浏览0评论

I'm starting to use flatpickr (moving from xdsoft datetimepicker, which seems no longer actively maintained) and would like to achieve scrolling behavior just like xdsoft's datetimepicker had, i.e. allowing scrolling between months with the mouse scroll wheel.

I see on that the functionality used to be there in the past, but that it was removed. On the plugins repo, I see a scrollPlugin.ts which I assume is what I'm looking for.

However I cannot find in the docs how to install this plugin.

I'm not using NPM or so but am loading the flatpickr js/css files directly:

<link rel="stylesheet" href="/static/flatpickr/material_blue.css">
<script src="/static/flatpickr/flatpickr.js"></script>

What is the proper way to install a TS plugin? Assuming TS stands for Typescript, do I need to transform it to JS and if so how?

Using Flatpickr 4.6.9 (latest one as time of writing).

I'm starting to use flatpickr (moving from xdsoft datetimepicker, which seems no longer actively maintained) and would like to achieve scrolling behavior just like xdsoft's datetimepicker had, i.e. allowing scrolling between months with the mouse scroll wheel.

I see on https://github./flatpickr/flatpickr/pull/1192 that the functionality used to be there in the past, but that it was removed. On the plugins repo, I see a scrollPlugin.ts which I assume is what I'm looking for.

However I cannot find in the docs how to install this plugin.

I'm not using NPM or so but am loading the flatpickr js/css files directly:

<link rel="stylesheet" href="/static/flatpickr/material_blue.css">
<script src="/static/flatpickr/flatpickr.js"></script>

What is the proper way to install a TS plugin? Assuming TS stands for Typescript, do I need to transform it to JS and if so how?

Using Flatpickr 4.6.9 (latest one as time of writing).

Share Improve this question edited Feb 15, 2021 at 10:48 SaeX asked Feb 14, 2021 at 9:29 SaeXSaeX 18.8k18 gold badges79 silver badges103 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

Seems you need to include the plugin file

like

<script src="https://unpkg./[email protected]/dist/plugins/scrollPlugin.js"></script>

For whoever is looking for the plugins JS files, I've found them through UNPKG/JSDelivr.

Just include them as any other CSS or JS.

发布评论

评论列表(0)

  1. 暂无评论