HTML5 Date Input Type Interfering with jQuery Datepicker

前端 未结 4 1481
孤街浪徒
孤街浪徒 2020-12-08 22:14

I am using the jQuery UI\'s datepicker for date selections on my site. One of my users just upgraded to the newest version of Chrome, which has built-in native date picker f

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 22:52

    Sometimes you cannot modify form types. For example, I'm using Symfony2 Bundle's FormType.

    I had this problem using Genemu jQuery Datepicker, and I solved this problem adding a calendar image button and a litle of css code.

    You can see final result in this link

    Here you can read documentation for adding image icon: jQuery UI Datepicker

    Then, I simple added a css like this (maybe style rules will be different for you):

    form input[type=date] + img {
        position: relative;
        left: -25px;
    }
    

提交回复
热议问题