0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

mdb5 datepicker 「(index):187 Uncaught TypeError: mdb.Datepicker is not a constructor ]というエラーが出た。

0
Posted at

エラー経緯とエラー内容

1.Bootstrap 5 & Material Design 2.0のPro版(MDB PRO ESSENTIAL € 17/month )を購入。
2.左上のメニューボタン > Getting started > Installation > Step 1 の「MDB 5 DOWNLOAD」ボタンをクリックし、「MDB5-STANDARD-UI-KIT-Free-3.2.0.zip」をダウンロード。
3.ダウンロードした「MDB5-STANDARD-UI-KIT-Free-3.2.0.zip」を解凍。
4.左上のメニューボタン > Forms > Datepicker の Basic example のコードをコピーして、index.htmlに張り付け。
5.ブラウザで確認。
6.下記エラーが出力された。
(index):187 Uncaught TypeError: mdb.Datepicker is not a constructor

pro版を購入したから動かせるはずなのになんで!?ってなって解決までに手こずりました。(笑)

エラー原因

pro版を購入していたのに、free版をダウンロードして使っていたから(;'∀')

解決方法

1.右上のアカウントボタン > Orders > 画面中央の青色のボタンをクリック
 →「MDB5-STANDARD-UI-KIT-PRO-ESSENTIAL.zip」みたいな名前です。
2.ダウンロードしたzipファイルを解凍。
3.左上のメニューボタン > Forms > Datepicker の Basic example のコードをコピーして、index.htmlに張り付け。
4.ブラウザで確認。
5.下記のように「Select a date」のinputタグとカレンダーiconが表示されて、iconをクリックしたら、カレンダーが表示されればOK。

感想

MDB 5 めちゃ便利。開発が楽に進みます!
お金はかかりますが、かかった分のもとはすぐに取れますね!
↑こんな感じのカレンダーセレクト画面を用意するとなると、それなりに工数かかりますし、なにしろ、メンテナンスがしっかりされているので、安心感があります!
ぜひ今後も MDB 5 を使ってみて、感想を投稿していこうと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?