Simple datepicker using $edit-text widget

55 views
Skip to first unread message

Mohammad

unread,
Aug 1, 2019, 11:40:09 AM8/1/19
to TiddlyWiki
Open 

and create a new tiddler and paste the below script

<$edit-text tiddler="mytiddler" field="mydate" type="date"/>        



This simply lets you to set  mydate field in mytiddler to a selected date!
 
Look at the mytiddler tiddler and check the mydate field

Is this a recommended procedure to have an html5 datapicker in TW?

--Mohammad

Jeremy Ruston

unread,
Aug 1, 2019, 11:43:31 AM8/1/19
to tiddl...@googlegroups.com
Hi Mohammad

The trouble with some of these HTML5 features is that they are not consistently implemented across browsers. Input elements of type date have particularly poor support because they don’t work in IE or Safari:

https://caniuse.com/#search=input-date

So, in practice, almost all sites nowadays implement their own date pickers (and colour pickers, sliders etc), so that they can guarantee consistent behaviour and appearance.

Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6e2131ba-c534-40d8-8011-3a7b97f564bc%40googlegroups.com.

Mohammad

unread,
Aug 1, 2019, 11:57:36 AM8/1/19
to TiddlyWiki
Hi Jeremy,
 Many thanks for clarification!

So, it is not encouraged!

Cheers
Mohammad 


On Thursday, August 1, 2019 at 8:13:31 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad

The trouble with some of these HTML5 features is that they are not consistently implemented across browsers. Input elements of type date have particularly poor support because they don’t work in IE or Safari:

https://caniuse.com/#search=input-date

So, in practice, almost all sites nowadays implement their own date pickers (and colour pickers, sliders etc), so that they can guarantee consistent behaviour and appearance.

Best wishes

Jeremy
On 1 Aug 2019, at 16:40, Mohammad <mohamma...@gmail.com> wrote:

Open 

and create a new tiddler and paste the below script

<$edit-text tiddler="mytiddler" field="mydate" type="date"/>        



This simply lets you to set  mydate field in mytiddler to a selected date!
 
Look at the mytiddler tiddler and check the mydate field

Is this a recommended procedure to have an html5 datapicker in TW?

--Mohammad

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Jeremy Ruston

unread,
Aug 1, 2019, 12:04:08 PM8/1/19
to tiddl...@googlegroups.com
Hi Mohammad


On 1 Aug 2019, at 16:57, Mohammad <mohammad...@gmail.com> wrote:

So, it is not encouraged!

Not if the intention is to be accessible to as many people as possible.

The core does use the HTML5 colour picker. Like the date picker, it falls back to an ordinary input control on browsers that don’t support it, making it a “progressive enhancement”.

Best wishes

Jeremy

Mohammad

unread,
Aug 1, 2019, 12:48:23 PM8/1/19
to TiddlyWiki
Thank you Jeremy!


On Thursday, August 1, 2019 at 8:34:08 PM UTC+4:30, Jeremy Ruston wrote:
Hi Mohammad
Reply all
Reply to author
Forward
0 new messages