Before I submit the dialogService, I checked the value in $scope.dateValue but even if I selected another date in the picker, it's still the current date (because I set it to new Date in the beginning).
I expected the selected date to be stored in the variable I passed as value but it's not working.
I was also looking in other forum threads but didn't found something working.
Can you tell me how I can access the selected value of the datePicker?
I built something around the Picker to get the value right from the input-field of the picker and worked with that.
I still don't know how to get the value from the picker itself, I'm sorry.
You are right. I just made a test and for some reason the date picker does not update the value. I have tested it with other views like media picker or content picker and it works so I suppose there is a problem with the Date Picker view.
Hi All - I think I found a solution to this problem... - I was looking for a DataPicket that took current Date if empty. I've used this string as inspiration.
Reuse of datepicker - how to get the value?
Hello,
I'm trying to reuse the umbraco Datepicker in a dialogservice together with other inputfields to edit some data.
This is how I included it so far in the controller:
In the view:
Before I submit the dialogService, I checked the value in $scope.dateValue but even if I selected another date in the picker, it's still the current date (because I set it to new Date in the beginning).
I expected the selected date to be stored in the variable I passed as value but it's not working. I was also looking in other forum threads but didn't found something working. Can you tell me how I can access the selected value of the datePicker?
Thank you in advance and best regards Theresa
Theresa,
Did you ever find a solution to this?
Peter
Hi Peter,
I built something around the Picker to get the value right from the input-field of the picker and worked with that. I still don't know how to get the value from the picker itself, I'm sorry.
The value is property of the $scope.datePicker. This means that you can get the value like this.
I have tried this, too but it has never changed, even if I changed the date in the picker.
It is strange. How you try to get the value? Do you try to get the value inside your controller?
I have tried it in the controller, for example with the console.log or the debugger, but also in the model for a quick look.
It returned always the value I set before when I created the picker.
You are right. I just made a test and for some reason the date picker does not update the value. I have tested it with other views like media picker or content picker and it works so I suppose there is a problem with the Date Picker view.
Hi All - I think I found a solution to this problem... - I was looking for a DataPicket that took current Date if empty. I've used this string as inspiration.
This is my View:
This is my controller:
Everything works as intented :-)
is working on a reply...