Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker and Timepicker not working on nextjs #1048

Closed
luismiguelmena opened this issue Jun 2, 2022 · 5 comments
Closed

Datepicker and Timepicker not working on nextjs #1048

luismiguelmena opened this issue Jun 2, 2022 · 5 comments

Comments

@luismiguelmena
Copy link

I have copied the html and all the stuffs installed but the components are not working and showing correctly
image

Here is my code:
<div className="flex justify-center"> <div className="timepicker relative form-floating mb-3 xl:w-96"> <input type="text" className="form-control block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none" placeholder="Select a date" /> <label htmlFor="floatingInput" className="text-gray-700"> Select a time </label> </div> </div>

@sajermann
Copy link

sajermann commented Jun 8, 2022

I have same problem in React without Nextjs (With Vite)

"react": "^18.0.0", "react-dom": "^18.0.0", "tw-elements": "^1.0.0-alpha12"

tailwind.config.js

module.exports = { darkMode: 'class', content: [ './src/**/*.tsx', './src/**/*.{html,js}', './node_modules/tw-elements/dist/js/**/*.js', ], theme: { extend: { colors: { brand: { 300: '#996DFF', 500: '#8257e6', }, }, borderRadius: { md: '4px', }, }, }, plugins: [require('tw-elements/dist/plugin'), require('tailwind-scrollbar')], };

index.html > <script src="node_modules/tw-elements/dist/js/index.min.js"></script>

@riesga
Copy link

riesga commented Sep 13, 2022

Any solution?

@sageworksstudio
Copy link

https://tailwind-elements.com/docs/standard/forms/datepicker/

The example text is wrong. <input type="text" should be <input type="date"

@Twansparant
Copy link

No it should be type="text" otherwise it will use the browser default datepicker.
Could it be the underlying MDB Datepicker is only available on the MDB Pro Essential package?

@Trochonovitz
Copy link
Member

Hi, we just have launched bunch of integration tutorials - both with CSR and SSR frameworks. If you have more questions about integration or you still got some problems with particular components, let us know by adding new issue / topic in discussions section (if there are some unclrear informations or just want let us know about something).

Next.js integration tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

7 participants