Skip to content

Instantly share code, notes, and snippets.

@mfeckie
Last active September 14, 2021 05:55
Show Gist options
  • Save mfeckie/9d01ffae577daff8aceb2a20b6a01943 to your computer and use it in GitHub Desktop.
Save mfeckie/9d01ffae577daff8aceb2a20b6a01943 to your computer and use it in GitHub Desktop.
New Twiddle
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
@tracked time = '11:00';
onChange = (event) => {
console.log(event);
}
}
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');
input {
font-family: 'Lato', sans-serif;
margin: 5px;
}
input[type="time"] {
padding: 5px;
width: 150px;
text-align: center;
font-size: 1rem;
}
<h1>Time Input example</h1>
<Input type="time" @value={{this.time}} {{on 'change' this.onChange}} />
{
"version": "0.17.1",
"EmberENV": {
"FEATURES": {},
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false,
"_APPLICATION_TEMPLATE_WRAPPER": true,
"_JQUERY_INTEGRATION": true
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js",
"ember": "3.18.1",
"ember-template-compiler": "3.18.1",
"ember-testing": "3.18.1"
},
"addons": {
"@glimmer/component": "1.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment