Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
DatePicker.svelte
<script>
import DatePicker from "./DatePicker.svelte";
let startDate = "2022-03-01";
let endDate = "2022-03-03";
const locale = {
en: {
days: "Su|Mo|Tu|We|Th|Fr|Sa".split("|"),
months: "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec".split('|'),
start: 0,
},
da: {
days: "Sø|Ma|Ti|On|To|Fr|Lø".split("|"),
months: "Jan|Feb|Mar|Apr|Maj|Jun|Jul|Aug|Sep|Okt|Nov|Dec".split('|'),
start: 1,
}
}
let culture = "en";
</script>

<h1>DatePicker</h1>

<label>
Culture:
<select bind:value={culture}>
{#each Object.keys(locale) as lang}
<option value={lang}>{lang}</option>
{/each}
</select>
</label>

<h3>Start Date</h3>
<input type="text" bind:value={startDate}/>
<DatePicker bind:value={startDate} {...locale[culture]}/>

Error compiling DatePicker.svelte

`<tr>` cannot be a child of `<table>`. `<table>` only allows these children: `<caption>`, `<colgroup>`, `<tbody>`, `<thead>`, `<tfoot>`, `<style>`, `<script>`, `<template>`. The browser will 'repair' the HTML (by moving, removing, or inserting elements) which breaks Svelte's assumptions about the structure of your components.
https://svelte.dev/e/node_invalid_placement
line 94 column 2
import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/legacy';
import * as $ from 'svelte/internal/client';
import DatePicker from "./DatePicker.svelte";

var root_1 = $.template(`<option> </option>`);
var root = $.template(`<h1>DatePicker</h1> <label>Culture: <select></select></label> <h3>Start Date</h3> <input type="text"> <!> <h3>End Date</h3> <input type="text"> <!>`, 1);

export default function App($$anchor, $$props) {
$.push($$props, false);

let startDate = $.mutable_state("2022-03-01");
let endDate = $.mutable_state("2022-03-03");

const locale = {
en: {
days: ("Su|Mo|Tu|We|Th|Fr|Sa").split("|"),
months: ("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec").split('|'),
start: 0
},
da: {
days: ("Sø|Ma|Ti|On|To|Fr|Lø").split("|"),
months: ("Jan|Feb|Mar|Apr|Maj|Jun|Jul|Aug|Sep|Okt|Nov|Dec").split('|'),
start: 1
}
};

let culture = $.mutable_state("en");

$.init();

var fragment = root();
var label = $.sibling($.first_child(fragment), 2);
var select = $.sibling($.child(label));

$.template_effect(() => {
result = svelte.compile(source, {
generate: ,
});
/* Add a <style> tag to see the CSS output */
		
			
				
  • Root {
    • css: null
    • js: []
    • start: 495
    • end: 920
    • type: "Root"
    • fragment: Fragment {...}
      • type: "Fragment"
      • nodes: [...] (16)
        • Text {...}
          • type: "Text"
          • start: 493
          • end: 495
          • raw: "\n\n"
          • data: "\n\n"
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 495
          • end: 514
          • name: "h1"
          • attributes: []
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: [...] (1)
              • Text {...}
                • type: "Text"
                • start: 499
                • end: 509
                • raw: "DatePicker"
                • data: "DatePicker"
                }
              ]
            }
          }
        • Text {...}
          • type: "Text"
          • start: 514
          • end: 516
          • raw: " "
          • data: " "
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 516
          • end: 680
          • name: "label"
          • attributes: []
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: [...] (3)
              • Text {...}
                • type: "Text"
                • start: 523
                • end: 537
                • raw: "Culture: "
                • data: "Culture: "
                }
              • RegularElement {...}
                • type: "RegularElement"
                • start: 537
                • end: 671
                • name: "select"
                • attributes: [...] (1)
                  • BindDirective {...}
                    • start: 545
                    • end: 565
                    • type: "BindDirective"
                    • name: "value"
                    • expression: Identifier {...}
                      • type: "Identifier"
                      • start: 557
                      • end: 564
                      • loc: {...}
                        • start: {...}
                          • line: 27
                          • column: 22
                          }
                        • end: {...}
                          • line: 27
                          • column: 29
                          }
                        }
                      • name: "culture"
                      }
                    • modifiers: []
                    }
                  ]
                • fragment: Fragment {...}
                  • type: "Fragment"
                  • nodes: [...] (3)
                    • Text {...}
                      • type: "Text"
                      • start: 566
                      • end: 571
                      • raw: "\n "
                      • data: "\n "
                      }
                    • EachBlock {...}
                      • type: "EachBlock"
                      • start: 571
                      • end: 659
                      • expression: CallExpression {...}
                        • type: "CallExpression"
                        • start: 578
                        • end: 597
                        • loc: {...}
                          • start: {...}
                            • line: 28
                            • column: 11
                            }
                          • end: {...}
                            • line: 28
                            • column: 30
                            }
                          }
                        • callee: MemberExpression {...}
                          • type: "MemberExpression"
                          • start: 578
                          • end: 589
                          • loc: {...}
                            • start: {...}
                              • line: 28
                              • column: 11
                              }
                            • end: {...}
                              • line: 28
                              • column: 22
                              }
                            }
                          • object: Identifier {...}
                            • type: "Identifier"
                            • start: 578
                            • end: 584
                            • loc: {...}
                              • start: {...}
                                • line: 28
                                • column: 11
                                }
                              • end: {...}
                                • line: 28
                                • column: 17
                                }
                              }
                            • name: "Object"
                            }
                          • property: Identifier {...}
                            • type: "Identifier"
                            • start: 585
                            • end: 589
                            • loc: {...}
                              • start: {...}
                                • line: 28
                                • column: 18
                                }
                              • end: {...}
                                • line: 28
                                • column: 22
                                }
                              }
                            • name: "keys"
                            }
                          • computed: false
                          • optional: false
                          }
                        • arguments: [...] (1)
                          • Identifier {...}
                            • type: "Identifier"
                            • start: 590
                            • end: 596
                            • loc: {...}
                              • start: {...}
                                • line: 28
                                • column: 23
                                }
                              • end: {...}
                                • line: 28
                                • column: 29
                                }
                              }
                            • name: "locale"
                            }
                          ]
                        • optional: false
                        }
                      • body: Fragment {...}
                        • type: "Fragment"
                        • nodes: [...] (3)
                          • Text {...}
                            • type: "Text"
                            • start: 606
                            • end: 611
                            • raw: "\n "
                            • data: "\n "
                            }
                          • RegularElement {...}
                            • type: "RegularElement"
                            • start: 611
                            • end: 647
                            • name: "option"
                            • attributes: [...] (1)
                              • Attribute {...}
                                • type: "Attribute"
                                • start: 619
                                • end: 631
                                • name: "value"
                                • value: ExpressionTag {...}
                                  • type: "ExpressionTag"
                                  • start: 625
                                  • end: 631
                                  • expression: Identifier {...}
                                    • type: "Identifier"
                                    • start: 626
                                    • end: 630
                                    • loc: {...}
                                      • start: {...}
                                        • line: 29
                                        • column: 19
                                        }
                                      • end: {...}
                                        • line: 29
                                        • column: 23
                                        }
                                      }
                                    • name: "lang"
                                    }
                                  }
                                }
                              ]
                            • fragment: Fragment {...}
                              • type: "Fragment"
                              • nodes: [...] (1)
                                • ExpressionTag {...}
                                  • type: "ExpressionTag"
                                  • start: 632
                                  • end: 638
                                  • expression: Identifier {...}
                                    • type: "Identifier"
                                    • start: 633
                                    • end: 637
                                    • loc: {...}
                                      • start: {...}
                                        • line: 29
                                        • column: 26
                                        }
                                      • end: {...}
                                        • line: 29
                                        • column: 30
                                        }
                                      }
                                    • name: "lang"
                                    }
                                  }
                                ]
                              }
                            }
                          • Text {...}
                            • type: "Text"
                            • start: 647
                            • end: 652
                            • raw: "\n "
                            • data: "\n "
                            }
                          ]
                        }
                      • context: Identifier {...}
                        • type: "Identifier"
                        • name: "lang"
                        • start: 601
                        • loc: {...}
                          • start: {...}
                            • line: 28
                            • column: 34
                            • character: 601
                            }
                          • end: {...}
                            • line: 28
                            • column: 38
                            • character: 605
                            }
                          }
                        • end: 605
                        • typeAnnotation: undefined
                        }
                      • index: undefined
                      • key: undefined
                      }
                    • Text {...}
                      • type: "Text"
                      • start: 659
                      • end: 662
                      • raw: "\n "
                      • data: "\n "
                      }
                    ]
                  }
                }
              • Text {...}
                • type: "Text"
                • start: 671
                • end: 672
                • raw: "\n"
                • data: "\n"
                }
              ]
            }
          }
        • Text {...}
          • type: "Text"
          • start: 680
          • end: 682
          • raw: " "
          • data: " "
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 682
          • end: 701
          • name: "h3"
          • attributes: []
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: [...] (1)
              • Text {...}
                • type: "Text"
                • start: 686
                • end: 696
                • raw: "Start Date"
                • data: "Start Date"
                }
              ]
            }
          }
        • Text {...}
          • type: "Text"
          • start: 701
          • end: 702
          • raw: " "
          • data: " "
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 702
          • end: 745
          • name: "input"
          • attributes: [...] (2)
            • Attribute {...}
              • type: "Attribute"
              • start: 709
              • end: 720
              • name: "type"
              • value: [...] (1)
                • Text {...}
                  • start: 715
                  • end: 719
                  • type: "Text"
                  • raw: "text"
                  • data: "text"
                  }
                ]
              }
            • BindDirective {...}
              • start: 721
              • end: 743
              • type: "BindDirective"
              • name: "value"
              • expression: Identifier {...}
                • type: "Identifier"
                • start: 733
                • end: 742
                • loc: {...}
                  • start: {...}
                    • line: 35
                    • column: 31
                    }
                  • end: {...}
                    • line: 35
                    • column: 40
                    }
                  }
                • name: "startDate"
                }
              • modifiers: []
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: []
            }
          }
        • Text {...}
          • type: "Text"
          • start: 745
          • end: 746
          • raw: " "
          • data: " "
          }
        • Component {...}
          • type: "Component"
          • start: 746
          • end: 803
          • name: "DatePicker"
          • attributes: [...] (2)
            • BindDirective {...}
              • start: 758
              • end: 780
              • type: "BindDirective"
              • name: "value"
              • expression: Identifier {...}
                • type: "Identifier"
                • start: 770
                • end: 779
                • loc: {...}
                  • start: {...}
                    • line: 36
                    • column: 24
                    }
                  • end: {...}
                    • line: 36
                    • column: 33
                    }
                  }
                • name: "startDate"
                }
              • modifiers: []
              }
            • SpreadAttribute {...}
              • type: "SpreadAttribute"
              • start: 781
              • end: 801
              • expression: MemberExpression {...}
                • type: "MemberExpression"
                • start: 785
                • end: 800
                • loc: {...}
                  • start: {...}
                    • line: 36
                    • column: 39
                    }
                  • end: {...}
                    • line: 36
                    • column: 54
                    }
                  }
                • object: Identifier {...}
                  • type: "Identifier"
                  • start: 785
                  • end: 791
                  • loc: {...}
                    • start: {...}
                      • line: 36
                      • column: 39
                      }
                    • end: {...}
                      • line: 36
                      • column: 45
                      }
                    }
                  • name: "locale"
                  }
                • property: Identifier {...}
                  • type: "Identifier"
                  • start: 792
                  • end: 799
                  • loc: {...}
                    • start: {...}
                      • line: 36
                      • column: 46
                      }
                    • end: {...}
                      • line: 36
                      • column: 53
                      }
                    }
                  • name: "culture"
                  }
                • computed: true
                • optional: false
                }
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: []
            }
          }
        • Text {...}
          • type: "Text"
          • start: 803
          • end: 805
          • raw: " "
          • data: " "
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 805
          • end: 822
          • name: "h3"
          • attributes: []
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: [...] (1)
              • Text {...}
                • type: "Text"
                • start: 809
                • end: 817
                • raw: "End Date"
                • data: "End Date"
                }
              ]
            }
          }
        • Text {...}
          • type: "Text"
          • start: 822
          • end: 823
          • raw: " "
          • data: " "
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 823
          • end: 864
          • name: "input"
          • attributes: [...] (2)
            • Attribute {...}
              • type: "Attribute"
              • start: 830
              • end: 841
              • name: "type"
              • value: [...] (1)
                • Text {...}
                  • start: 836
                  • end: 840
                  • type: "Text"
                  • raw: "text"
                  • data: "text"
                  }
                ]
              }
            • BindDirective {...}
              • start: 842
              • end: 862
              • type: "BindDirective"
              • name: "value"
              • expression: Identifier {...}
                • type: "Identifier"
                • start: 854
                • end: 861
                • loc: {...}
                  • start: {...}
                    • line: 39
                    • column: 31
                    }
                  • end: {...}
                    • line: 39
                    • column: 38
                    }
                  }
                • name: "endDate"
                }
              • modifiers: []
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: []
            }
          }
        • Text {...}
          • type: "Text"
          • start: 864
          • end: 865
          • raw: " "
          • data: " "
          }
        • Component {...}
          • type: "Component"
          • start: 865
          • end: 920
          • name: "DatePicker"
          • attributes: [...] (2)
            • BindDirective {...}
              • start: 877
              • end: 897
              • type: "BindDirective"
              • name: "value"
              • expression: Identifier {...}
                • type: "Identifier"
                • start: 889
                • end: 896
                • loc: {...}
                  • start: {...}
                    • line: 40
                    • column: 24
                    }
                  • end: {...}
                    • line: 40
                    • column: 31
                    }
                  }
                • name: "endDate"
                }
              • modifiers: []
              }
            • SpreadAttribute {...}
              • type: "SpreadAttribute"
              • start: 898
              • end: 918
              • expression: MemberExpression {...}
                • type: "MemberExpression"
                • start: 902
                • end: 917
                • loc: {...}
                  • start: {...}
                    • line: 40
                    • column: 37
                    }
                  • end: {...}
                    • line: 40
                    • column: 52
                    }
                  }
                • object: Identifier {...}
                  • type: "Identifier"
                  • start: 902
                  • end: 908
                  • loc: {...}
                    • start: {...}
                      • line: 40
                      • column: 37
                      }
                    • end: {...}
                      • line: 40
                      • column: 43
                      }
                    }
                  • name: "locale"
                  }
                • property: Identifier {...}
                  • type: "Identifier"
                  • start: 909
                  • end: 916
                  • loc: {...}
                    • start: {...}
                      • line: 40
                      • column: 44
                      }
                    • end: {...}
                      • line: 40
                      • column: 51
                      }
                    }
                  • name: "culture"
                  }
                • computed: true
                • optional: false
                }
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: []
            }
          }
        ]
      }
    • options: null
    • instance: Script {...}
      • type: "Script"
      • start: 0
      • end: 493
      • context: "default"
      • content: Program {...}
        • type: "Program"
        • start: 8
        • end: 484
        • loc: {...}
          • start: {...}
            • line: 1
            • column: 0
            }
          • end: {...}
            • line: 21
            • column: 0
            }
          }
        • body: [...] (5)
          • ImportDeclaration {...}
            • type: "ImportDeclaration"
            • start: 11
            • end: 56
            • loc: {...}
              • start: {...}
                • line: 2
                • column: 2
                }
              • end: {...}
                • line: 2
                • column: 47
                }
              }
            • specifiers: [...] (1)
              • ImportDefaultSpecifier {...}
                • type: "ImportDefaultSpecifier"
                • start: 18
                • end: 28
                • loc: {...}
                  • start: {...}
                    • line: 2
                    • column: 9
                    }
                  • end: {...}
                    • line: 2
                    • column: 19
                    }
                  }
                • local: Identifier {...}
                  • type: "Identifier"
                  • start: 18
                  • end: 28
                  • loc: {...}
                    • start: {...}
                      • line: 2
                      • column: 9
                      }
                    • end: {...}
                      • line: 2
                      • column: 19
                      }
                    }
                  • name: "DatePicker"
                  }
                }
              ]
            • source: Literal {...}
              • type: "Literal"
              • start: 34
              • end: 55
              • loc: {...}
                • start: {...}
                  • line: 2
                  • column: 25
                  }
                • end: {...}
                  • line: 2
                  • column: 46
                  }
                }
              • value: "./DatePicker.svelte"
              • raw: "\"./DatePicker.svelte\""
              }
            }
          • VariableDeclaration {...}
            • type: "VariableDeclaration"
            • start: 62
            • end: 91
            • loc: {...}
              • start: {...}
                • line: 4
                • column: 2
                }
              • end: {...}
                • line: 4
                • column: 31
                }
              }
            • declarations: [...] (1)
              • VariableDeclarator {...}
                • type: "VariableDeclarator"
                • start: 66
                • end: 90
                • loc: {...}
                  • start: {...}
                    • line: 4
                    • column: 6
                    }
                  • end: {...}
                    • line: 4
                    • column: 30
                    }
                  }
                • id: Identifier {...}
                  • type: "Identifier"
                  • start: 66
                  • end: 75
                  • loc: {...}
                    • start: {...}
                      • line: 4
                      • column: 6
                      }
                    • end: {...}
                      • line: 4
                      • column: 15
                      }
                    }
                  • name: "startDate"
                  }
                • init: Literal {...}
                  • type: "Literal"
                  • start: 78
                  • end: 90
                  • loc: {...}
                    • start: {...}
                      • line: 4
                      • column: 18
                      }
                    • end: {...}
                      • line: 4
                      • column: 30
                      }
                    }
                  • value: "2022-03-01"
                  • raw: "\"2022-03-01\""
                  }
                }
              ]
            • kind: "let"
            }
          • VariableDeclaration {...}
            • type: "VariableDeclaration"
            • start: 94
            • end: 121
            • loc: {...}
              • start: {...}
                • line: 5
                • column: 2
                }
              • end: {...}
                • line: 5
                • column: 29
                }
              }
            • declarations: [...] (1)
              • VariableDeclarator {...}
                • type: "VariableDeclarator"
                • start: 98
                • end: 120
                • loc: {...}
                  • start: {...}
                    • line: 5
                    • column: 6
                    }
                  • end: {...}
                    • line: 5
                    • column: 28
                    }
                  }
                • id: Identifier {...}
                  • type: "Identifier"
                  • start: 98
                  • end: 105
                  • loc: {...}
                    • start: {...}
                      • line: 5
                      • column: 6
                      }
                    • end: {...}
                      • line: 5
                      • column: 13
                      }
                    }
                  • name: "endDate"
                  }
                • init: Literal {...}
                  • type: "Literal"
                  • start: 108
                  • end: 120
                  • loc: {...}
                    • start: {...}
                      • line: 5
                      • column: 16
                      }
                    • end: {...}
                      • line: 5
                      • column: 28
                      }
                    }
                  • value: "2022-03-03"
                  • raw: "\"2022-03-03\""
                  }
                }
              ]
            • kind: "let"
            }
          • VariableDeclaration {...}
            • type: "VariableDeclaration"
            • start: 127
            • end: 458
            • loc: {...}
              • start: {...}
                • line: 7
                • column: 2
                }
              • end: {...}
                • line: 18
                • column: 3
                }
              }
            • declarations: [...] (1)
              • VariableDeclarator {...}
                • type: "VariableDeclarator"
                • start: 133
                • end: 458
                • loc: {...}
                  • start: {...}
                    • line: 7
                    • column: 8
                    }
                  • end: {...}
                    • line: 18
                    • column: 3
                    }
                  }
                • id: Identifier {...}
                  • type: "Identifier"
                  • start: 133
                  • end: 139
                  • loc: {...}
                    • start: {...}
                      • line: 7
                      • column: 8
                      }
                    • end: {...}
                      • line: 7
                      • column: 14
                      }
                    }
                  • name: "locale"
                  }
                • init: ObjectExpression {...}
                  • type: "ObjectExpression"
                  • start: 142
                  • end: 458
                  • loc: {...}
                    • start: {...}
                      • line: 7
                      • column: 17
                      }
                    • end: {...}
                      • line: 18
                      • column: 3
                      }
                    }
                  • properties: [...] (2)
                    • Property {...}
                      • type: "Property"
                      • start: 148
                      • end: 298
                      • loc: {...}
                        • start: {...}
                          • line: 8
                          • column: 4
                          }
                        • end: {...}
                          • line: 12
                          • column: 5
                          }
                        }
                      • method: false
                      • shorthand: false
                      • computed: false
                      • key: Identifier {...}
                        • type: "Identifier"
                        • start: 148
                        • end: 150
                        • loc: {...}
                          • start: {...}
                            • line: 8
                            • column: 4
                            }
                          • end: {...}
                            • line: 8
                            • column: 6
                            }
                          }
                        • name: "en"
                        }
                      • value: ObjectExpression {...}
                        • type: "ObjectExpression"
                        • start: 152
                        • end: 298
                        • loc: {...}
                          • start: {...}
                            • line: 8
                            • column: 8
                            }
                          • end: {...}
                            • line: 12
                            • column: 5
                            }
                          }
                        • properties: [...] (3)
                          • Property {...}
                            • type: "Property"
                            • start: 160
                            • end: 199
                            • loc: {...}
                              • start: {...}
                                • line: 9
                                • column: 6
                                }
                              • end: {...}
                                • line: 9
                                • column: 45
                                }
                              }
                            • method: false
                            • shorthand: false
                            • computed: false
                            • key: Identifier {...}
                              • type: "Identifier"
                              • start: 160
                              • end: 164
                              • loc: {...}
                                • start: {...}
                                  • line: 9
                                  • column: 6
                                  }
                                • end: {...}
                                  • line: 9
                                  • column: 10
                                  }
                                }
                              • name: "days"
                              }
                            • value: CallExpression {...}
                              • type: "CallExpression"
                              • start: 166
                              • end: 199
                              • loc: {...}
                                • start: {...}
                                  • line: 9
                                  • column: 12
                                  }
                                • end: {...}
                                  • line: 9
                                  • column: 45
                                  }
                                }
                              • callee: MemberExpression {...}
                                • type: "MemberExpression"
                                • start: 166
                                • end: 194
                                • loc: {...}
                                  • start: {...}
                                    • line: 9
                                    • column: 12
                                    }
                                  • end: {...}
                                    • line: 9
                                    • column: 40
                                    }
                                  }
                                • object: Literal {...}
                                  • type: "Literal"
                                  • start: 166
                                  • end: 188
                                  • loc: {...}
                                    • start: {...}
                                      • line: 9
                                      • column: 12
                                      }
                                    • end: {...}
                                      • line: 9
                                      • column: 34
                                      }
                                    }
                                  • value: "Su|Mo|Tu|We|Th|Fr|Sa"
                                  • raw: "\"Su|Mo|Tu|We|Th|Fr|Sa\""
                                  }
                                • property: Identifier {...}
                                  • type: "Identifier"
                                  • start: 189
                                  • end: 194
                                  • loc: {...}
                                    • start: {...}
                                      • line: 9
                                      • column: 35
                                      }
                                    • end: {...}
                                      • line: 9
                                      • column: 40
                                      }
                                    }
                                  • name: "split"
                                  }
                                • computed: false
                                • optional: false
                                }
                              • arguments: [...] (1)
                                • Literal {...}
                                  • type: "Literal"
                                  • start: 195
                                  • end: 198
                                  • loc: {...}
                                    • start: {...}
                                      • line: 9
                                      • column: 41
                                      }
                                    • end: {...}
                                      • line: 9
                                      • column: 44
                                      }
                                    }
                                  • value: "|"
                                  • raw: "\"|\""
                                  }
                                ]
                              • optional: false
                              }
                            • kind: "init"
                            }
                          • Property {...}
                            • type: "Property"
                            • start: 207
                            • end: 275
                            • loc: {...}
                              • start: {...}
                                • line: 10
                                • column: 6
                                }
                              • end: {...}
                                • line: 10
                                • column: 74
                                }
                              }
                            • method: false
                            • shorthand: false
                            • computed: false
                            • key: Identifier {...}
                              • type: "Identifier"
                              • start: 207
                              • end: 213
                              • loc: {...}
                                • start: {...}
                                  • line: 10
                                  • column: 6
                                  }
                                • end: {...}
                                  • line: 10
                                  • column: 12
                                  }
                                }
                              • name: "months"
                              }
                            • value: CallExpression {...}
                              • type: "CallExpression"
                              • start: 215
                              • end: 275
                              • loc: {...}
                                • start: {...}
                                  • line: 10
                                  • column: 14
                                  }
                                • end: {...}
                                  • line: 10
                                  • column: 74
                                  }
                                }
                              • callee: MemberExpression {...}
                                • type: "MemberExpression"
                                • start: 215
                                • end: 270
                                • loc: {...}
                                  • start: {...}
                                    • line: 10
                                    • column: 14
                                    }
                                  • end: {...}
                                    • line: 10
                                    • column: 69
                                    }
                                  }
                                • object: Literal {...}
                                  • type: "Literal"
                                  • start: 215
                                  • end: 264
                                  • loc: {...}
                                    • start: {...}
                                      • line: 10
                                      • column: 14
                                      }
                                    • end: {...}
                                      • line: 10
                                      • column: 63
                                      }
                                    }
                                  • value: "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec"
                                  • raw: "\"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec\""
                                  }
                                • property: Identifier {...}
                                  • type: "Identifier"
                                  • start: 265
                                  • end: 270
                                  • loc: {...}
                                    • start: {...}
                                      • line: 10
                                      • column: 64
                                      }
                                    • end: {...}
                                      • line: 10
                                      • column: 69
                                      }
                                    }
                                  • name: "split"
                                  }
                                • computed: false
                                • optional: false
                                }
                              • arguments: [...] (1)
                                • Literal {...}
                                  • type: "Literal"
                                  • start: 271
                                  • end: 274
                                  • loc: {...}
                                    • start: {...}
                                      • line: 10
                                      • column: 70
                                      }
                                    • end: {...}
                                      • line: 10
                                      • column: 73
                                      }
                                    }
                                  • value: "|"
                                  • raw: "'|'"
                                  }
                                ]
                              • optional: false
                              }
                            • kind: "init"
                            }
                          • Property {...}
                            • type: "Property"
                            • start: 283
                            • end: 291
                            • loc: {...}
                              • start: {...}
                                • line: 11
                                • column: 6
                                }
                              • end: {...}
                                • line: 11
                                • column: 14
                                }
                              }
                            • method: false
                            • shorthand: false
                            • computed: false
                            • key: Identifier {...}
                              • type: "Identifier"
                              • start: 283
                              • end: 288
                              • loc: {...}
                                • start: {...}
                                  • line: 11
                                  • column: 6
                                  }
                                • end: {...}
                                  • line: 11
                                  • column: 11
                                  }
                                }
                              • name: "start"
                              }
                            • value: Literal {...}
                              • type: "Literal"
                              • start: 290
                              • end: 291
                              • loc: {...}
                                • start: {...}
                                  • line: 11
                                  • column: 13
                                  }
                                • end: {...}
                                  • line: 11
                                  • column: 14
                                  }
                                }
                              • value: 0
                              • raw: "0"
                              }
                            • kind: "init"
                            }
                          ]
                        }
                      • kind: "init"
                      }
                    • Property {...}
                      • type: "Property"
                      • start: 304
                      • end: 454
                      • loc: {...}
                        • start: {...}
                          • line: 13
                          • column: 4
                          }
                        • end: {...}
                          • line: 17
                          • column: 5
                          }
                        }
                      • method: false
                      • shorthand: false
                      • computed: false
                      • key: Identifier {...}
                        • type: "Identifier"
                        • start: 304
                        • end: 306
                        • loc: {...}
                          • start: {...}
                            • line: 13
                            • column: 4
                            }
                          • end: {...}
                            • line: 13
                            • column: 6
                            }
                          }
                        • name: "da"
                        }
                      • value: ObjectExpression {...}
                        • type: "ObjectExpression"
                        • start: 308
                        • end: 454
                        • loc: {...}
                          • start: {...}
                            • line: 13
                            • column: 8
                            }
                          • end: {...}
                            • line: 17
                            • column: 5
                            }
                          }
                        • properties: [...] (3)
                          • Property {...}
                            • type: "Property"
                            • start: 316
                            • end: 355
                            • loc: {...}
                              • start: {...}
                                • line: 14
                                • column: 6
                                }
                              • end: {...}
                                • line: 14
                                • column: 45
                                }
                              }
                            • method: false
                            • shorthand: false
                            • computed: false
                            • key: Identifier {...}
                              • type: "Identifier"
                              • start: 316
                              • end: 320
                              • loc: {...}
                                • start: {...}
                                  • line: 14
                                  • column: 6
                                  }
                                • end: {...}
                                  • line: 14
                                  • column: 10
                                  }
                                }
                              • name: "days"
                              }
                            • value: CallExpression {...}
                              • type: "CallExpression"
                              • start: 322
                              • end: 355
                              • loc: {...}
                                • start: {...}
                                  • line: 14
                                  • column: 12
                                  }
                                • end: {...}
                                  • line: 14
                                  • column: 45
                                  }
                                }
                              • callee: MemberExpression {...}
                                • type: "MemberExpression"
                                • start: 322
                                • end: 350
                                • loc: {...}
                                  • start: {...}
                                    • line: 14
                                    • column: 12
                                    }
                                  • end: {...}
                                    • line: 14
                                    • column: 40
                                    }
                                  }
                                • object: Literal {...}
                                  • type: "Literal"
                                  • start: 322
                                  • end: 344
                                  • loc: {...}
                                    • start: {...}
                                      • line: 14
                                      • column: 12
                                      }
                                    • end: {...}
                                      • line: 14
                                      • column: 34
                                      }
                                    }
                                  • value: "Sø|Ma|Ti|On|To|Fr|Lø"
                                  • raw: "\"Sø|Ma|Ti|On|To|Fr|Lø\""
                                  }
                                • property: Identifier {...}
                                  • type: "Identifier"
                                  • start: 345
                                  • end: 350
                                  • loc: {...}
                                    • start: {...}
                                      • line: 14
                                      • column: 35
                                      }
                                    • end: {...}
                                      • line: 14
                                      • column: 40
                                      }
                                    }
                                  • name: "split"
                                  }
                                • computed: false
                                • optional: false
                                }
                              • arguments: [...] (1)
                                • Literal {...}
                                  • type: "Literal"
                                  • start: 351
                                  • end: 354
                                  • loc: {...}
                                    • start: {...}
                                      • line: 14
                                      • column: 41
                                      }
                                    • end: {...}
                                      • line: 14
                                      • column: 44
                                      }
                                    }
                                  • value: "|"
                                  • raw: "\"|\""
                                  }
                                ]
                              • optional: false
                              }
                            • kind: "init"
                            }
                          • Property {...}
                            • type: "Property"
                            • start: 363
                            • end: 431
                            • loc: {...}
                              • start: {...}
                                • line: 15
                                • column: 6
                                }
                              • end: {...}
                                • line: 15
                                • column: 74
                                }
                              }
                            • method: false
                            • shorthand: false
                            • computed: false
                            • key: Identifier {...}
                              • type: "Identifier"
                              • start: 363
                              • end: 369
                              • loc: {...}
                                • start: {...}
                                  • line: 15
                                  • column: 6
                                  }
                                • end: {...}
                                  • line: 15
                                  • column: 12
                                  }
                                }
                              • name: "months"
                              }
                            • value: CallExpression {...}
                              • type: "CallExpression"
                              • start: 371
                              • end: 431
                              • loc: {...}
                                • start: {...}
                                  • line: 15
                                  • column: 14
                                  }
                                • end: {...}
                                  • line: 15
                                  • column: 74
                                  }
                                }
                              • callee: MemberExpression {...}
                                • type: "MemberExpression"
                                • start: 371
                                • end: 426
                                • loc: {...}
                                  • start: {...}
                                    • line: 15
                                    • column: 14
                                    }
                                  • end: {...}
                                    • line: 15
                                    • column: 69
                                    }
                                  }
                                • object: Literal {...}
                                  • type: "Literal"
                                  • start: 371
                                  • end: 420
                                  • loc: {...}
                                    • start: {...}
                                      • line: 15
                                      • column: 14
                                      }
                                    • end: {...}
                                      • line: 15
                                      • column: 63
                                      }
                                    }
                                  • value: "Jan|Feb|Mar|Apr|Maj|Jun|Jul|Aug|Sep|Okt|Nov|Dec"
                                  • raw: "\"Jan|Feb|Mar|Apr|Maj|Jun|Jul|Aug|Sep|Okt|Nov|Dec\""
                                  }
                                • property: Identifier {...}
                                  • type: "Identifier"
                                  • start: 421
                                  • end: 426
                                  • loc: {...}
                                    • start: {...}
                                      • line: 15
                                      • column: 64
                                      }
                                    • end: {...}
                                      • line: 15
                                      • column: 69
                                      }
                                    }
                                  • name: "split"
                                  }
                                • computed: false
                                • optional: false
                                }
                              • arguments: [...] (1)
                                • Literal {...}
                                  • type: "Literal"
                                  • start: 427
                                  • end: 430
                                  • loc: {...}
                                    • start: {...}
                                      • line: 15
                                      • column: 70
                                      }
                                    • end: {...}
                                      • line: 15
                                      • column: 73
                                      }
                                    }
                                  • value: "|"
                                  • raw: "'|'"
                                  }
                                ]
                              • optional: false
                              }
                            • kind: "init"
                            }
                          • Property {...}
                            • type: "Property"
                            • start: 439
                            • end: 447
                            • loc: {...}
                              • start: {...}
                                • line: 16
                                • column: 6
                                }
                              • end: {...}
                                • line: 16
                                • column: 14
                                }
                              }
                            • method: false
                            • shorthand: false
                            • computed: false
                            • key: Identifier {...}
                              • type: "Identifier"
                              • start: 439
                              • end: 444
                              • loc: {...}
                                • start: {...}
                                  • line: 16
                                  • column: 6
                                  }
                                • end: {...}
                                  • line: 16
                                  • column: 11
                                  }
                                }
                              • name: "start"
                              }
                            • value: Literal {...}
                              • type: "Literal"
                              • start: 446
                              • end: 447
                              • loc: {...}
                                • start: {...}
                                  • line: 16
                                  • column: 13
                                  }
                                • end: {...}
                                  • line: 16
                                  • column: 14
                                  }
                                }
                              • value: 1
                              • raw: "1"
                              }
                            • kind: "init"
                            }
                          ]
                        }
                      • kind: "init"
                      }
                    ]
                  }
                }
              ]
            • kind: "const"
            }
          • VariableDeclaration {...}
            • type: "VariableDeclaration"
            • start: 464
            • end: 483
            • loc: {...}
              • start: {...}
                • line: 20
                • column: 2
                }
              • end: {...}
                • line: 20
                • column: 21
                }
              }
            • declarations: [...] (1)
              • VariableDeclarator {...}
                • type: "VariableDeclarator"
                • start: 468
                • end: 482
                • loc: {...}
                  • start: {...}
                    • line: 20
                    • column: 6
                    }
                  • end: {...}
                    • line: 20
                    • column: 20
                    }
                  }
                • id: Identifier {...}
                  • type: "Identifier"
                  • start: 468
                  • end: 475
                  • loc: {...}
                    • start: {...}
                      • line: 20
                      • column: 6
                      }
                    • end: {...}
                      • line: 20
                      • column: 13
                      }
                    }
                  • name: "culture"
                  }
                • init: Literal {...}
                  • type: "Literal"
                  • start: 478
                  • end: 482
                  • loc: {...}
                    • start: {...}
                      • line: 20
                      • column: 16
                      }
                    • end: {...}
                      • line: 20
                      • column: 20
                      }
                    }
                  • value: "en"
                  • raw: "\"en\""
                  }
                }
              ]
            • kind: "let"
            }
          ]
        • sourceType: "module"
        }
      • attributes: []
      }
    }
The AST is not public API and may change at any point in time
Datepicker • Playground • Svelte