I am using TailwindCSS for my Vue application. What I am looking for is a solution to floating label for input date element. The problem is that the input label always remain activated.

What I have tried:
<div class="relative">
<input id="date-placeholder" type="date" inputmode="date" class="focus:ring-primary focus:border-primary block w-full sm:text-sm border-gray-300 rounded-md" value="2019-02-23" />
<label
for="date-placeholder"
class="absolute left-3 bg-white -top-2.5 px-1 text-gray-600 text-sm transition-all duration-300 peer-placeholder-shown:text-base peer-placeholder-shown:text-gray-400 peer-placeholder-shown:top-2.5 peer-focus:-top-2.5 peer-focus:text-gray-600 peer-focus:text-sm">
Test Date
</label>
</div>