如何获得jQuery UI的日期选择器与angular2工作吗? [英] How to get jquery ui date picker working with angular2?

查看:2211
本文介绍了如何获得jQuery UI的日期选择器与angular2工作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得jQuery UI的日期选择器与angular2工作?

How to get jquery ui date picker working with angular2?

我使用angular2和打字稿用HTML5。

I'm using angular2 and typescript with html5.

我想加入jQuery UI的日期选择器。

I'm trying to add the jquery ui datepicker.

我所有的图书馆的,并且增加了CSS,但日期选择器的jQuery code为连接最多的HTML。

I have all the librarys and the css added but the datepicker jquery code is wiring up to the html.

lib目录下: https://jqueryui.com/datepicker/

我的继承人code:

  <script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });
  </script>

  <p>Date: <input type="text" id="datepicker"></p>

我试图把这个在我的组件:$(#datepicker).datepicker();
但我只是得到错误。

I've tried putting this in my component : $( "#datepicker" ).datepicker(); But I just get errors.

什么想法?

我得到这个错误,当我将项目添加到我的:

I get this error when I add the project to mine:

在这里输入的形象描述

推荐答案

好,已经有可用于angular2许多日期选择器库。他们几个人我已经发布如下:

Well there are already many datepicker libraries available for the angular2. few of them i have posted below:

  • https://github.com/kekeh/mydatepicker
  • https://github.com/jkuri/ng2-datepicker
  • http://www.primefaces.org/primeng/#/calendar

但显然是每个人都需要为我们的项目时尚的日期选择我太想相同的,所以我根据需要我已经使用造型bootflat框架创建的日期选择器。你可以参考这里。

but yes obviously everyone need stylish datepicker for our project me too want same so i according to need i have created one datepicker using bootflat framework for styling. you can refer here..

https://github.com/MrPardeep/Angular2-DatePicker

希望这可以帮助你!

在这里输入的形象描述

这篇关于如何获得jQuery UI的日期选择器与angular2工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆