@likable-hair/svelte 3.1.37 → 3.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  <script>import IMask, { InputMask } from "imask";
2
2
  import SimpleTextField from "../../simple/forms/SimpleTextField.svelte";
3
- import DatePicker from "../../simple/dates/DatePicker.svelte";
4
3
  import Menu from "../../simple/common/Menu.svelte";
5
4
  import Icon from "../../simple/media/Icon.svelte";
6
5
  import { onMount } from "svelte";
@@ -49,11 +48,14 @@ onMount(() => {
49
48
  function handleInputChange(event) {
50
49
  setTimeout(() => {
51
50
  const typedValue = mask.value;
51
+ console.log(typedValue);
52
52
  if (typedValue !== void 0 && typedValue !== null) {
53
53
  const yearIndex = pattern.indexOf("yyyy");
54
54
  const year = typedValue.substring(yearIndex, yearIndex + 4);
55
55
  if (year.length == 4) {
56
56
  selectedYear = Number(year);
57
+ } else if (year.length == 0) {
58
+ selectedYear = void 0;
57
59
  }
58
60
  dispatch("input", {
59
61
  year: selectedYear
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@likable-hair/svelte",
3
3
  "description": "A Svelte component for likablehair and others",
4
- "version": "3.1.37",
4
+ "version": "3.1.38",
5
5
  "scripts": {
6
6
  "host": "vite --host",
7
7
  "dev": "vite dev",